elHelgo Posted January 9, 2007 Share Posted January 9, 2007 I'm trying to set a PHP variable to the value of a form on a page, but I'm having no luck finding what I need.Essentially, here's what I need:$formvalue = document.Form1.field.value;If this can be done, and someone knows how, many thanks are headed in advance.Thanks,elHelgo Link to comment https://forums.phpfreaks.com/topic/33510-php-javascript/ Share on other sites More sharing options...
trq Posted January 9, 2007 Share Posted January 9, 2007 You'll need to submit the form to the php page and then get the value out of the $_POST array. Link to comment https://forums.phpfreaks.com/topic/33510-php-javascript/#findComment-156837 Share on other sites More sharing options...
kenrbnsn Posted January 9, 2007 Share Posted January 9, 2007 When the form is submitted to your php script the value of all the fields will be in either the $_GET or $_POST array depending on the method used to submit the form. The value would be in either $_GET['field'] or $_POST['field'].More information can be found in the [url=http://www.php.net/manual/en/language.variables.external.php]manual[/url]Ken Link to comment https://forums.phpfreaks.com/topic/33510-php-javascript/#findComment-156839 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.