dflow Posted May 12, 2010 Share Posted May 12, 2010 i wrote this script for some reason it's not executing after submitting <?php $ProposalID = $_GET['PropID']; $con = mysql_pconnect($hostname_international, $username_international, $password_international); if (!$con) { die('Could not connect: ' . mysql_error()); } if (isset($_POST['submit'])) { mysql_select_db("international", $con); $query="UPDATE proposals, contact_form SET contact_form.StatusID =6, proposals.StatusID=6 WHERE proposals.RequestID = contact_form.RequestID AND proposals.ProposalID = '$ProposalID'"; $update_tables_action = mysql_query($query) or trigger_error(mysql_error(),E_USER_ERROR); echo "POST: <BR>"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/201507-update-table-join/ Share on other sites More sharing options...
Muddy_Funster Posted May 12, 2010 Share Posted May 12, 2010 is proposalID a varchar or an int? and does it have a valid value in it when you echo it out? Quote Link to comment https://forums.phpfreaks.com/topic/201507-update-table-join/#findComment-1057204 Share on other sites More sharing options...
dflow Posted May 12, 2010 Author Share Posted May 12, 2010 is proposalID a varchar or an int? and does it have a valid value in it when you echo it out? it is an int and it gets the url parameter Quote Link to comment https://forums.phpfreaks.com/topic/201507-update-table-join/#findComment-1057205 Share on other sites More sharing options...
dflow Posted May 13, 2010 Author Share Posted May 13, 2010 strange aint it? Quote Link to comment https://forums.phpfreaks.com/topic/201507-update-table-join/#findComment-1057809 Share on other sites More sharing options...
mattal999 Posted May 13, 2010 Share Posted May 13, 2010 Does the form have an image button or a submit button with the name "submit". If it has an image button, then x and y values are passed. If it is a submit button, but has no name then $_POST['submit'] will not be passed. Quote Link to comment https://forums.phpfreaks.com/topic/201507-update-table-join/#findComment-1057812 Share on other sites More sharing options...
Muddy_Funster Posted May 14, 2010 Share Posted May 14, 2010 As it's an int unquote it in the update query. you are basicly telling the query the input is a string, and then trying to compare that to a coluim in your database that you have told the database isn't allowed string values in the first place. Quote Link to comment https://forums.phpfreaks.com/topic/201507-update-table-join/#findComment-1058116 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.