Jump to content

Working on a Contact Me script, and need some help


justin15

Recommended Posts

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.
[i]Script is not close to done. I am still adding more features, lots .. I hope ![/i]


[b]HTML:[/b]
[code]
<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>
[/code]

[b]PHP:[/b]
[code]
<php

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

echo $comments1;



?>
[/code]

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
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]
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\" /]
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.

[b]PHP Code:[/b]
[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>
[/code]

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

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

Anyway, Thanks again.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.