PHP_PhREEEk Posted November 30, 2007 Share Posted November 30, 2007 Sorry man - Been busy with a project, so I can only jump in with quick answers to anyone's questions. I might have time to look at this over the weekend, but being that we're heading straight into XMas holiday crap, the wife might have other plans for me. So, I can't guarantee a solution for you anytime soon. Hopefully someone else might be able to help, although this entire post may soon end up in 3rd party software support... lol PhREEEk Quote Link to comment Share on other sites More sharing options...
nealios Posted November 30, 2007 Author Share Posted November 30, 2007 No worries, Phreek. Really appreciate your help, i understand that you must have other things to do! If you get the time it would be good. The the main thing i want the thing to do is for the drop down box to take the customer id and save it back in my database. Cant see why its not working, probably just a simple thing! Cheers Nealios Quote Link to comment Share on other sites More sharing options...
nealios Posted December 1, 2007 Author Share Posted December 1, 2007 Phreek, moment of clarity today and realised that it was a simple error that i wasnt calling the select the same as i wanted it to be going into the database. Spent so much time trying various SQL statements but the answer was directly infront of me! $customer_select = " <select name=\"cid\">\n";//changed from customer to cid....schoolboy error while( $data = mysql_fetch_array($result) ) { $customer_select .= " <option value=\"{$data['cid']}\">{$data['cid']} {$data['first_name']} {$data['surname']}</option>\n"; } $customer_select .= " </select>\n"; Quote Link to comment Share on other sites More sharing options...
nealios Posted December 1, 2007 Author Share Posted December 1, 2007 One more quick question, hopefully should be a quick one! Within my form i want a checkbox that i can mark off a customer has paid or not. Ive currently set the checkbox up in the form. <td>Paid<input name =\"Paid\" type=\"checkbox\" value=\"{$row['Paid']}\"</td> Currently the field in the database is set up as tinyint (1) which is a boolean datatype. But im guessing, judging by reading up about it i need a bit of code that that says whether it is checked or not to register in the database. I think this is similar to the code i would need to get it to work but im not sure where it should go within the If statement? $Paid = !isset($_POST["Paid"]? NULL: $_POST["Paid"]); Can you help? Cheers Nealios Quote Link to comment Share on other sites More sharing options...
mlin Posted December 1, 2007 Share Posted December 1, 2007 all of the queries directly using the $_POST array should be sanitized or someone could cause some big problems. Quote Link to comment Share on other sites More sharing options...
nealios Posted December 1, 2007 Author Share Posted December 1, 2007 How would you go about "sanitizing" the code? Quote Link to comment Share on other sites More sharing options...
PHP_PhREEEk Posted December 1, 2007 Share Posted December 1, 2007 all of the queries directly using the $_POST array should be sanitized or someone could cause some big problems. The script was quite clearly, if not obnoxiously reiterated that it is not for a public production server. geez.... = / Quote Link to comment 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.