Note that there are some explanatory texts on larger screens.

plurals
  1. POMysql error in syntax near 'Amritsar')'
    primarykey
    data
    text
    <p>What is this error? Does anyone know ?</p> <p>When I post in localhost this error will come. What is this error where is the problem in my code?</p> <blockquote> <p>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Amritsar')' at line 1</p> </blockquote> <pre><code> &lt;?php include("includes/connect.php"); if(isset($_POST['submit'])){ $name = $_POST['name']; $surname = $_POST['surname']; $business_name = $_POST['business_name']; $email = $_POST['email']; $emailagain = $_POST['emailagain']; $password = $_POST['password']; $business_category = $_POST['business_category']; $country = $_POST['country']; $city = $_POST['city']; if($name==''){ echo"&lt;script&gt;alert('Lütfen İsmi Doldurunuz')&lt;/script&gt;"; exit(); } if($surname==''){ echo"&lt;script&gt;alert('Lütfen Soyadı Doldurunuz')&lt;/script&gt;"; exit(); } if($business_name==''){ echo"&lt;script&gt;alert('Lütfen Şirkat Adınızı Doldurunuz')&lt;/script&gt;"; exit(); } if($email==''){ echo"&lt;script&gt;alert('Lütfen eposta alanını Doldurunuz')&lt;/script&gt;"; exit(); } if($email != $emailagain){ echo"&lt;script&gt;alert('entered email addresses don't match')&lt;/script&gt;"; exit(); } $check_email = "SELECT * FROM users WHERE email='$email'"; $run = mysql_query($check_email); if(mysql_num_rows($run)&gt;0){ echo "&lt;script&gt;alert('Email $email is kullanılmaktadır, farklı bir adresi le kaydolmayı deneyin')&lt;/script&gt;"; exit(); } $query ="INSERT INTO `users` (`name`,`surname`,`business_name`, `email`,`emailagain`,`password`,`business_category`,`country`,`city`) VALUES ('$name','$surname','$business_name', '$email','$emailagain','$password','$business_category','$country,'$city')"; $result = mysql_query($query) or die(mysql_error()); if($result){ echo("&lt;center&gt;&lt;h1&gt;Yayınınız başarıyla gerçekleştirilmiştir&lt;/h1&gt;&lt;/center&gt;"); } else { echo("&lt;center&gt;&lt;h1&gt;Yayınınız gerçekleştirilemedi&lt;/h1&gt;&lt;/center&gt;"); } } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload