tcorbeil Posted April 4, 2007 Share Posted April 4, 2007 Hello again. Just wondering.. if I have this line: <input name="UserName" type="text" id="UserName" size="45" maxlength="25" /> How do I get a php variable get the value from the HTML variable? Can I do: $var1 = 'UserName'; Any suggestions would be appreciated. T. Link to comment https://forums.phpfreaks.com/topic/45626-variable-passing/ Share on other sites More sharing options...
emehrkay Posted April 4, 2007 Share Posted April 4, 2007 you have to do it after the form is submitted via the $_POST superglobal so $var1 = $_POST['UserName']; Link to comment https://forums.phpfreaks.com/topic/45626-variable-passing/#findComment-221599 Share on other sites More sharing options...
tcorbeil Posted April 4, 2007 Author Share Posted April 4, 2007 Thanks. Got it. T. Link to comment https://forums.phpfreaks.com/topic/45626-variable-passing/#findComment-221607 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.