Answer the question
In order to leave comments, you need to log in
How to fix a GET request?
Good afternoon. There is such a code
$id = $_GET['id'];
$query = "SELECT * FROM products WHERE products_id='$id' ";
$result = $conn->query($query);
if (mysqli_num_rows($result) > 0 ){
$row = mysqli_fetch_array($result);
$row['image']!="" && file_exists("resources/tovarimages/".$row["image"]);
$img_path ='resources/tovarimages/'.$row["image"];
$maxwidth = 300;
$maxheight = 550;
list($width,$height) = getimagesize($img_path);
$rheight = $maxheight/$height;
$rwidth = $maxwidth/$width;
$ratio = min($rheight,$rwidth);
$width = intval($ratio*$width);
$height = intval($ratio*$height);
}
var_dump($id) ;
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?id=$1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question