Jump to content

eljaydee

Members
  • Posts

    10
  • Joined

  • Last visited

About eljaydee

  • Birthday 02/01/1958

Profile Information

  • Gender
    Male
  • Location
    Kingston, Ontario
  • Age
    61

eljaydee's Achievements

Member

Member (2/5)

0

Reputation

  1. I have searched the internet about this and found hundreds have asked the question and not once was it answered in a meaningful way--or maybe I'm just dense. Would somebody please tell me what is the problem here: Simple, simple form: <html> <body> <form action="send_post.php" method="post"> <p>A: <input type="text" name="A"> <p>B: <input type="text" name="B"> <p><input type="submit"> </form> </body> </html> =========== Simple, simple PHP script: <?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'xyz'; $dbname = 'ABC'; $conn = mysqli_connect($dbhost, $dbuser, $dbpass,$dbname); if($conn) echo 'Connected successfully. <br> Here are the results of your query:<br><br>'; $A=$_POST["A"]; $B=$_POST["B"]; $sql = 'SELECT * FROM numbers WHERE A = $A AND B = $B'; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_array($result)) { echo $row["0"] . ", &nbsp;"; } } else { echo "0 results"; } mysqli_close($conn); ?> Which is 'parameter 1'? and which is the 'bool given'? But most importantly, how should it be written so that it returns the desired results? I have checked the query from the CMD line, it returns multiple entries. Really, I have reached FRUSTRATION OVERLOAD!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.