problema insert into
Scris: Dum Sep 02, 2018 11:43 am
Salut. Sunt si eu la inceput in d'ale programatului, lucrez la o firma mica de transport si vreau sa fac un tabel cu programul soferilor dar... m-am poticnit in php/mysql...
Am cumparat domeniu/hosting si vreau sa incerc sa fac un tabel. Nu reusesc sa bag date intr-un tabel. Am creeat un php simplu sa vad daca merge si nu reusesc.
<?php
include ("auth.php");
$connect = mysql_connect ($host_name, $user_name, $host_password);
if(!$connect) {
echo "Nu m-am conectat";
}
mysql_select_db($db_name);
$sql = "INSERT INTO $program ('nr' , 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'Liber1', 'Liber2', 'data') VALUES (NULL , 'tata' , 'buni' , 'profa' , 'mama' , '' , '' , '' , '' , '')";
?>
Codul de mai sus nu imi introduce nimic in tabel.
Am cumparat domeniu/hosting si vreau sa incerc sa fac un tabel. Nu reusesc sa bag date intr-un tabel. Am creeat un php simplu sa vad daca merge si nu reusesc.
<?php
include ("auth.php");
$connect = mysql_connect ($host_name, $user_name, $host_password);
if(!$connect) {
echo "Nu m-am conectat";
}
mysql_select_db($db_name);
$sql = "INSERT INTO $program ('nr' , 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'Liber1', 'Liber2', 'data') VALUES (NULL , 'tata' , 'buni' , 'profa' , 'mama' , '' , '' , '' , '' , '')";
?>
Codul de mai sus nu imi introduce nimic in tabel.