I want create php file that show a db all row's, i look at the internet but there "$" is syntax error, and other variable i didn't find.
Here's my php code :
if(isset($_POST['search'])) {
$searchq = $_POST['search']; };
$query = 'SELECT * FROM serviss WHERE pasutijuma_nummurs =$searchq ';
I tried put in
$query = 'SELECT * FROM serviss WHERE pasutijuma_nummurs ='·$searchq' ';
But query didn't work at all.
And here's my HTML form:
<form action="search.php" method="POST">
Meklēt pēc pasūtijuma nummura <input type="text" name="search ">
<input type="submit" value="Search"/>
</form>
I hope someone can help me.
Fixed that problem :
$result = pg_query($db, "SELECT * FROM serviss where pasutijuma_nummurs = '$_POST[search]'");