Jump to content


Photo

Working on a Contact Me script, and need some help


  • Please log in to reply
5 replies to this topic

#1 justin15

justin15
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 10 June 2006 - 09:52 PM

Hello, this is my first post, and I hope will be one of many, Because I'll admit, I am a PHP Newb, but anyway, I need help with a script I am working on, it seems to do nothing of what I want it to, I will post the HTML and PHP Code below.
Script is not close to done. I am still adding more features, lots .. I hope !


HTML:
<form action="comment.php" method="post">
<B>Name:</B><input type="text sixe="20" value="Your Name." name="comments1"></input><BR>
<B>E-Mail (Optional):</B><input type="text sixe="20" value="Your E-Mail (Optional)" name="comments2"></input><BR>
<B>Comments:</B><BR>
<textarea value="Your Comments Here" rows="10" name="comments3">
</textarea><BR>
<input type="submit" value="Send">
</form>

PHP:
<php

$comments1 = $_POST['comments1'];
$comments2 = $_POST['comments2'];
$comments3 = $_POST['comments3'];

echo $comments1;



?>

All I want to make it do, as of now, is take the Name, E-Mail, and Comments from the last page and display it, Thats it for now.

Thanks

#2 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 10 June 2006 - 10:03 PM

What is the problem or error you are getting?

You know, that should work...
~ D Kuang

#3 justin15

justin15
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 10 June 2006 - 10:17 PM

I am getting plain nothing, when you click the submit button, you get a blank page ... I will post a link below


[a href=\"http://24.215.127.102/PHP/comment/\" target=\"_blank\"]Here you go, click here to see the script on a Working PHP Enabled server.[/a]

#4 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 10 June 2006 - 10:24 PM

Oh, sorry I failed to see your error. The start tag:

<php

should be:

<?php

Tip: Whenever you have display issues, open the generated source. It may show you things your browser hide from you.
~ D Kuang

#5 justin15

justin15
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 10 June 2006 - 10:34 PM

Ahh, Thank you ! Very good, now I shall be off to make more features / finish the script, or atleast try to work on it ! ! [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]

#6 justin15

justin15
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 10 June 2006 - 10:51 PM

Ok, Got a little bit farther ... But now I have screwed up again, But I am pretty sure on the line I messed up on.

PHP Code:
<div align="center">
<?php

$comments1 = $_POST['comments1'];
$comments2 = $_POST['comments2'];
$comments3 = $_POST['comments3'];

echo "Your information will display below, if this information is right please continue on by pressing <I>Continue</I> farther down the page";
echo "Your name is" $comments1 "Your E-Mail is" $comments2 "Your comments are" $comments3;



?>
</div>

Now the code will work without the second echo
Second Echo Code:
echo "Your name is" $comments1 "Your E-Mail is" $comments2 "Your comments are" $comments3;

So, my guess is that I am not using the Varibles right, But I am still learnin, so .. Whatever .. lol

Anyway, Thanks again.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users