Navigation

upload

Upload souborů

<p>
<INPUT type="file" name="uploadedfile" size="62">

$trimmed=htmlspecialchars($_FILES["uploadedfile"]["name"]);
$trimmed=substr($trimmed, -3, 3);
$retez=$num_rows.".".$trimmed;

mysql_query("INSERT INTO quads (nazev,popis,cena,razeni,typ) VALUES ('$x_nazev','$x_popis','$x_cena','$x_razeni','$trimmed')");

$result=mysql_query("SELECT * FROM quads where nazev='$x_nazev' and popis='$x_popis'");
$cislo = @mysql_fetch_array($result);
//echo"$cislo[0]"; echo"<br>";
$uploaddir = './pictures/';
$uploadfile = $uploaddir . $cislo[0] . "." . $trimmed;

PHP - File upload

<p>
<INPUT type="file" name="uploadedfile" size="62">

$trimmed=htmlspecialchars($_FILES["uploadedfile"]["name"]);
$trimmed=substr($trimmed, -3, 3);
$retez=$num_rows.".".$trimmed;

mysql_query("INSERT INTO quads (nazev,popis,cena,razeni,typ) VALUES ('$x_nazev','$x_popis','$x_cena','$x_razeni','$trimmed')");

$result=mysql_query("SELECT * FROM quads where nazev='$x_nazev' and popis='$x_popis'");
$cislo = @mysql_fetch_array($result);
//echo"$cislo[0]"; echo"<br>";
$uploaddir = './pictures/';
$uploadfile = $uploaddir . $cislo[0] . "." . $trimmed;
Subscribe to upload