Re: Confusion for newbie
> trim ($playername);
If you want the value from trime call, assign it ...
$playername = trim ($playername);
> $sqla = "SELECT firstname, lastname, home, age, bio FROM players
where lastname = $playername";
The value is a string, MySQL needs it quoted, '$playername'.
> $resulta = mysqli_query($conn, $sqla);
Always trap errors in API calls, at the very least ...
$resulta = mysqli_query($conn, $sqla) or exit( mysqli_error($conn) );
Subject
Written By
Posted
Re: Confusion for newbie
July 23, 2017 02:21PM
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.