Jump to content
php.lv forumi

es tikai gribu ievietot info datu bāzē


artfiction

Recommended Posts

Tāds lūk kods:

<?php
if (isset($_POST['submit'])):
{$db = mysql_connect('localhost','user','pasword')
  or die(mysql_errno().' : '.mysql_error());

  mysql_select_db('datubaze')
  or die(mysql_errno().' : '.mysql_error());

$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$address = $_POST['address'];
$product = $_POST['product'];
$sql = "INSERT INTO pasutijumi SET
	  name='$name',
	  email='$email',
	  phone='$phone',
	  address='$address',
	  product='$product'
	  "; 
if (@mysql_query($sql)) {
echo('<p>info nosūtīts</p>');
 } else {
echo('<p>Kaut kas nav pareizi: ' .
	 mysql_error() . '</p>');
 }		  

	  ?>

 

Un tādu erroru visu laiku met laukā:

Parse error: syntax error, unexpected $end in /home/artfic22/public_html/forma.php on line 50

 

Nu es vnk nesaprotu ko viņš no manis tagad tur prasa, kur kas nav.

Varbūt varat palīdzēt?

 

PALDIES LIELS!

Link to comment
Share on other sites

×
×
  • Create New...