Witam, o to kodzik program gdzie dodaje fotki i chce zapisać je do rekodu tak:
<?php
$id=$_GET['id'];
$aBasePath = dirname( $PATH_TRANSLATED ); for ( $nIndex = 0; $nIndex < count( $thefiles ); $nIndex++ ) {
if ( !empty( $thefiles_name[$nIndex] ) ) {
$aType = $thefiles_type[$nIndex];
if ( ( $aType == \"image/gif\" ) ||
( $aType == \"image/pjpeg\" ) ||
( $aType == \"image/jpeg\" ) )
{
$aNewName = $aBasePath . \"/foty/\" .
$thefiles_name[$nIndex];
copy( $thefiles[$nIndex], $aNewName ); $aNewNames[] = $thefiles_name[$nIndex];
$zapytanie = \"INSERT INTO jpegi SET url='$aNewName' nierID='$id'\";
if($wynik) { echo \"rekord dodany\"; }
else
{ echo \"nie dodano\"; } }
}
}
?>
Niestety nie zapisuje mi ich może mi ktoś powiedzieć dlaczego? a tak wygląda teabla :
<?php
$zapytanie = \"CREATE TABLE jpegi(\".
\"id int(11) DEFAULT '0' NOT NULL auto_increment,\".
\"url blob,\".
\"nierID int(11),\".
\"UNIQUE id(id),\".
\"PRIMARY KEY (id)\".
\")\";
?>
PLSSS Help
Foto na serewe wrzuca bez problemu