No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
2 Posted Topics
Re: hi. some syntex error in your code... **add this code check it again** <?php $host = "localhost"; $db = "mdb"; $user ="sbuser"; $pass =""; $Patid=$_POST['Patid']; $Location=$_POST['Location']; $conn = new PDO("mysql:host=$host;name=$name",$user,$pass); $sqlInsert = "UPDATE lobby SET Location=? WHERE Patid=?"; $preparedStatement = $conn->prepare($sqlInsert); $preparedStatement->execute(array($Location, $Patid)); ?> | |
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> Product: <select name="s_product"> <option value="">Plz select product</option> <option value="1">TV</option> <option value="2">Fan</option> <option value="3">Light</option> </select><br/><br/><br/> </form> <?php if(isset($_POST['s_product'])) { $product=$_POST['s_product']; $sql = "SELECT * FROM `data` join product on data.p_id=product.p_id WHERE … |
The End.