what am i looking for is to make me get into a page only if the 2 $_post
values are equal to what columns in a table have, let's say i have a table |id|name|text|
, so when my php page have a $_post['id']
and $_post['name']
equal to what my table have in both of them, only then my text
column will show what value it has inside, and if one of values of id
and name
are different of what my table have then it wont show the text
value.
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$ID = isset($_POST['id']) ? $_POST['id'] : (isset($_GET['id']) ? $_GET['id'] : true);
$name ='Arthur';
$connect = mysqli_connect("localhost","root","mysql","manga");
$query = "SELECT * FROM `in-chapter` INNER JOIN `manga-list` ON `in-chapter`.id = `manga-list`.id WHERE `manga-list`.id = $ID";
$records = mysqli_query($connect,$query);
if ($ID > 0) {
while($show=mysqli_fetch_array($records)){
echo '<img src="'.$show['images'].'"></img>';
}
}
}
?>