CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Adding text "information has been send" under form after sending form

Print topic Send  topic

Author Message
lebun

Posts: 10
Posted: 11/30/2008, 4:13 AM

I want to add info text after sending form.
I know it can be done by echo but i want to do it on the same page under my form.
I tried to do it by adding label and changing text or adding panel to my form and visible true / false but it doesnt work.

form button onclick

$rs_search = mysql_query("select email from users where user='$_POST[login]' AND e-mail='$_POST[email]'");
$user_count = mysql_num_rows($rs_search);
if ($user_count != 0)
{
$users->label1->SetValue("New password has been send to your email address");
}
else
{
$users->label1->SetValue("user or email are not correct");
}


I also tried to check errors volidate section on my form

if (users->Errors->Count == 0)
{
$users->label1->SetValue("New password has been send to your email address");
}

but it also doesnt work.
Who now how can it be done to write text on the same page under form.
View profile  Send private message
mentecky

Posts: 321
Posted: 11/30/2008, 4:26 AM

lebun,

On CCSElite we use a seperate page to tell the user their email was sent.

Just create a page, email_sent.php, for example. Then in your form's After Insert event just add the following:
global $Redirect;  
$Redirect = "email_sent.php";
After Insert will only be called if the insert worked. That way you know the insert didn't have any errors.

Hope that helps!

Rick
_________________
http://www.ccselite.com
View profile  Send private message
Waspman

Posts: 948
Posted: 11/30/2008, 5:31 AM

I do it by setting a session after submit and having a lable that gets it's value from the session.

T
_________________
http://www.waspmedia.co.uk
View profile  Send private message
lebun

Posts: 10
Posted: 11/30/2008, 7:12 AM

I have the way to do it. It cam be done by redirect to the same page with parametrs. The parametrs are checked when the page is opend.

Befor show

if ($user_count != 0"")
{
$users->info->SetValue("<font color='#008000'><b>New password has been send</font>");
}

info is a label in the form.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.