if (isset($_GET['worked']) && $_GET['worked'] == '1') {
Posted: Thu Jul 15, 2010 2:26 pm
Hi all,
Small question, i have a form, and i just want to show the info from that form inside of this;
if (isset($_GET['worked']) && $_GET['worked'] == '1') {
}
I can get the text to show, but the .$_POST["name"]. wont appar
is it because its in this command, or am i using post and not the correct method?!?
any help would be great, as you can tell, i am a compleate beginner.
Thanks
here are some code snippets:
Small question, i have a form, and i just want to show the info from that form inside of this;
if (isset($_GET['worked']) && $_GET['worked'] == '1') {
}
I can get the text to show, but the .$_POST["name"]. wont appar
any help would be great, as you can tell, i am a compleate beginner.
Thanks
here are some code snippets:
Code: Select all
<?php
$name = $_POST["name"];
$message = $_POST["message"];
if($name)
{header( 'Location: same-page.php?worked=1' ) ;}
?>
<head>
</head>
<body>
<?php
if (isset($_GET['worked']) && $_GET['worked'] == '1') {
echo "Thank you ".$_POST["name"].", for your message:". $_POST["message"];
}
?>
<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST">
<h3>Name:</h3>
<input name="name" type="text" class="single-line"/>
<br />
<h3>Message:</h3>
<textarea name="message" class="multi-line"></textarea>
<br />
<input type="image" class="input_button" src="images/submit.jpg" alt="Submit">
</form>