PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
unix77
Forum Newbie
Posts: 7 Joined: Tue Jun 07, 2005 6:13 am
Location: south korea
Post
by unix77 » Tue Jun 14, 2005 1:58 am
Hi all
I got one PHP + HTML example that make me confuse. I post this code here :
Code: Select all
<html>
<body>
<table>
<tr>
<td>Note</td>
<td>Code: Select all
<?php
print("<textarea rows=\"5\" cols = \"40\"");
print("name=\"note\">$note</textarea>");
?>Code: Select all
</td>
</tr>
</table>
<form action="e;changestar1.php"e; method="e;post"e;>Code: Select all
<?php
print("<input type=\"HIDDEN\" name=\"code\"");
print("<value=\"$code\">");
?>Code: Select all
<input type="e;submit"e; value="e;SAVE"e;>
</form>
</body
</html>
It code try to send variable note to changestar1.php, however, can changestar1.php receive data ?
Last edited by
unix77 on Tue Jun 14, 2005 5:21 am, edited 1 time in total.
unix77
Forum Newbie
Posts: 7 Joined: Tue Jun 07, 2005 6:13 am
Location: south korea
Post
by unix77 » Tue Jun 14, 2005 2:55 am
I got it, i think it is impossible to send data outside form html
thallish
Forum Commoner
Posts: 60 Joined: Wed Mar 02, 2005 11:38 am
Location: Aalborg, Denmark
Post
by thallish » Tue Jun 14, 2005 2:57 am
first of all you need to put your textarea inside your form else you can't get that data
furthermore be sure that you have set your variable $code somewhere above your hidden textfield
and this line
Code: Select all
print("e;<value=\"e;$code\"e;>"e;);
should be
Code: Select all
print("e;value=\"e;$code\"e;>"e;);
after thats done you can grab the data being send from your textara and your hiddden text field by using
Code: Select all
//grab it with theese
$_POSTї'note']
$_POSTї'code']
/thallish