MySQL Forums
Forum List  »  PHP

Re: Return values from a select
Posted by: Peter Brawley
Date: August 05, 2018 08:58AM

1. Why hide error messages from yourself? Always include error traps in PHP database function calls, eg ...

$result = $conn->query($sql) or exit( mysqli_error($conn) );

2. After running the query, you need to fetch the result row(s). Look up mysqli_fetch.

3. $_POST[] makes no sense with the other code you show. It's for capturing values posted from one PHP page to another. Read about $_POST[].

Let's see the actual error messages you get, and the result of ...

Show Create Table customer;

Options: ReplyQuote


Subject
Written By
Posted
August 04, 2018 03:13PM
Re: Return values from a select
August 05, 2018 08:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.