[RESOLVED] using $_POST
Posted: Thu Jan 15, 2009 7:25 am
Hello all,
I've been looking at this code for ages now and can't seem to work out what is wrong. I keep getting the following message "Notice: Undefined index: name1 in C:\Program Files\EasyPHP 3.0\www\formtest.php on line 16"
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form method="post" action="http://localhost/page2.php?img_id=17647.jpg">
Input1: <input type="text" name="name1" id="ins1"><br />
Input2: <input type="text" name="name2" id="ins2"><br />
Input3: <input type="text" name="name3" id="ins3"><br />
<input type="submit" value="submit">
</form>
<?php
$textfieldcontent1 = $_POST['name1'];
?>
</body>
</html>
Can anyone help me figure out why I'm getting this message?
Thanks in advance!
bubs81
I've been looking at this code for ages now and can't seem to work out what is wrong. I keep getting the following message "Notice: Undefined index: name1 in C:\Program Files\EasyPHP 3.0\www\formtest.php on line 16"
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form method="post" action="http://localhost/page2.php?img_id=17647.jpg">
Input1: <input type="text" name="name1" id="ins1"><br />
Input2: <input type="text" name="name2" id="ins2"><br />
Input3: <input type="text" name="name3" id="ins3"><br />
<input type="submit" value="submit">
</form>
<?php
$textfieldcontent1 = $_POST['name1'];
?>
</body>
</html>
Can anyone help me figure out why I'm getting this message?
Thanks in advance!
bubs81