PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 23rd, 1999, 08:04 PM
cisk
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
http://www.txraves.org/~djcisk/php/temporaryphp.php
***************************

I'm still new to php and whenever i have freetime i try to learn more and more. Right now i'm working on making a form that cahnged within the same page with PATH_INFO
I have the user input the information then, it when tye click submit it then prints it
back to them to see if they are sure about sending it. It prints out fine in the second part but not when it sends the mail or int he 3rd page. My code is right below(excluding some of form html code)

Thanks for any help and sorry for the long code here..


Cisk

*******
<?php
if($submit){
// Send the mail yo!
mail("djcisk@aol.com", $subject, "Subject: $subjectnMessage: $messagenn", "From: $name");
print "Thank you $namen";
print "Sent was successful";
} elseif($verify){
// Formatting strings
$name = htmlspecialchars(trim($name));
$subject = htmlspecialchars(trim($subject));
$message = htmlspecialchars(trim($message));
// Display information to see if that's what they want sent
?>

Are you sure you want this sent?:<p></p>
<form method="post" action="<?php echo $PATH_INFO?>">
<pre>
Name: <?php print "$name";?>
<br>
Subject: <?php printf("%s", $subject);?>
<br>
Message: <?php printf("%s", $message);?>
<br>
<input type="submit" name="submit" value="Send it already!">
</form
</pre>
<?php
}
// This one ends the if statement after the verify button was pressed
else{
// Display the main input form
?>
<body bgcolor="white" text="navy">

<form method="post" action="<?php echo $PATH_INFO?>">
Name:
<input type="text" name="name" size="20" maxlength="20">
Subject:
<input type="text" name="subject" size="20" maxlenth="20">
Message:
<textarea cols="17" rows="5" name="message"></textarea>
<input type="submit" name="verify" value="Submit">
</form>
<?php
} // ends if
?>
***

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Passing Variables In Same Page

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap