Hi, Would be a great help if someone could help me here. I've got basically everything I need completed. I've got SQL data base up. I've got form that I fill out and adds ID to database Its a simple PHP validation script that validates a customer ID based off of their input. You can see demo here http://192.185.52.231/~okcorp/outpost_server/chat.php. The working script is below: <?PHP if($_GET["inputid"] == "0" && $_GET["value"] == "TEST") { echo "lz_validate_input_result(true,0);"; exit(); } else { echo "lz_validate_input_result(false,0);"; exit(); } ?> "TEST" needs to be replaced with ID from database. if($_GET["inputid"] == "0" is required in order for a TRUE response from server so it can validate customer ID. I'm sure this is easy. Anyone can help me by modifying my code would be huge help!
1) It helps to have formatting. Pastebin could help. 2) Use an IDE that tells you whats a string and whats a functions. It appears that lz_validate_input_result looks like a function, but you are encapsulating it as a string, which would echo the literal name of the function and not its results.
its a Custom Field Validation using livezilla. The only instructions they give are here https://www.livezilla.net/faq/en/?fid=input-validation I need to be able to import custom ID's from database. I have code below will display the id's <?php $con=mysqli_connect("localhost","user","pass","client_data"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $result = mysqli_query($con,"SELECT * FROM data"); while($row = mysqli_fetch_array($result)) { echo $row['clientid']; } mysqli_close($con); ?> I actually turned it into a function . From link below you can see id's 105 and 106 being displayed. http://www.partoutpost.com/client/data/display_new.php source for display_new.php is <?php include("client_id.php"); ?> <?php clientid(); ?>
What exactly are you trying to do? Show some result based on which ID given by the user? (ie, if the user provides "105" then you'll show whatever is registered on "105" from the database?) First thing you'd need for that is a WHERE-clause in the query...
I'm also having a hard time understanding what you're trying to accomplish exactly. Are you just trying to provide a TRUE/FALSE answer if an ID is valid (exists in your database)?