View Single Post
ישן 12-01-06, 19:33   # 3
CSite.co.il
משתמש - היכל התהילה
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
הודעות: 1,816

CSite.co.il לא מחובר  

תנסה את זה:

PHP קוד:
<?PHP 

$name 
$_POST['name']; 

$number $_POST['number']; 

mysql_connect("localhost","root") or die("cant connect: ".mysql_error()); 

mysql_select_db("aviv") or die("cant open DB: ".mysql_error()); 

$SQL "INSERT INTO `vegetables`('name','number') VALUES('$name','$number');"

mysql_query("$SQL")or die("cant query: ".mysql_error()); 

$SQLL "SELECT name FROM vegetables"
$res mysql_query($SQL) or die("cant query:".mysql_error()); 
$rows mysql_num_rows($res); 
echo 
"We got $rows rows back<BR>"
while(
$row mysql_fetch_assoc($res)) { 
echo 
$row['name']."<BR>"
}; 
?>
  Reply With Quote