wiggst3r Posted January 29, 2009 Share Posted January 29, 2009 Hi I've written a site that I want to be able to track where users who visit my site have come from when they submit the form. The URL is http://www.example.com?source=email_1 What I want to do, is If anyone has this in the URL and they submit the form, the email_1 is passed and inserted into the database Thanks Link to comment https://forums.phpfreaks.com/topic/142943-hidden-field-and-passing-url-variables/ Share on other sites More sharing options...
printf Posted January 29, 2009 Share Posted January 29, 2009 $from = isset ( $_GET['source'] ) ? mysql_real_escape_string ( $_GET['source'] ) : ''; // insert here... (just an example...) $sql = "INSERT INTO some_table VALUES ( '', 'value_from_form_one', '" . $from . "' );"; Link to comment https://forums.phpfreaks.com/topic/142943-hidden-field-and-passing-url-variables/#findComment-749489 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.