<removed code> for now, the refid is set to a certain id, and the statusinfo is as well, but they will both be posted via ajax later on. Basically, and I am a very noob programmer, so there may be a better way to do what I am trying to do: post a users id and statusinfo to this file. if the user verified the code right, it will set a mysql column for their id to read 1, if not, then it will set it to 0 thanks a bunch in advance, tim
$verified =" mysql_query($success) or die(mysql_error())"; is incorrect. $verified = mysql_query( $success ) or die( mysql_error( ) ); is correct Also, your script doesn't seem to be accepting anything from $_POST, is that all the code ?
Thanks, I changed the unverified and verified lines. I am not accepting POST right now because I want to make sure the code works without introducing a form. I tried it again, and what it should do in this case is set the verification status of the user with the id of 1204 to 0, but it does nothing. maybe something is wrong in this line: $success=' UPDATE `fsr_users` SET `verified` = "1" WHERE `fsr_users`.`id` ="$refid"'; PHP: ? What that should do is set the column verified to 1 for that particular user id
Yes there is. $variable = function_call( $args ); this will cause $variable to be populated as soon as it is declared, you're executing both queries regardless of the rest of the script. Please post the entire code, or make a copy of it on the server it is on and rename it to "whatever.phps" then post a link so we can see the entire source.
before I post my whole file (i would need to explain the whole thing and include several other files), could I just do: original if (blah) { $unverified; echo "There was a problem processing your code. Please try again, and if you cannot get it to work send in a support ticket so we can manually verify you."; } PHP: new: if (blah) { mysql_query( $success ) or die( mysql_error( ) ); echo "There was a problem processing your code. Please try again, and if you cannot get it to work send in a support ticket so we can manually verify you."; } PHP: and never declare $verified?
probably, but I dunno what is in statusinfo[1] so can' say for sure, it is a mysql array, and if so what function was used to build it ?
That worked just fine, thanks a bunch krakjoe for the explanation. the function that was used was code for contacting telesign via SOAP to verify users.