Problem with php mysql

I wanted to do a simple script. That how it looks like:

index.php:
[php]

Steam username Steam password [/php]

pagr.php:

[php]<?php
$name = ($_POST[‘name’]);
$pass = ($_POST[‘pass’]);
$link = mysql_connect(‘localhost’, ‘root’, ‘’);
mysql_select_db(“db”, $link);
mysql_query(“INSERT INTO users (name,pass) VALUES(’$name’,’$pass’)”);
mysql_close($link);
?>[/php]

But when you write in text area in this case name and password it writes in mysql, but it writes not the name and password that i typed but zeros(0). Whats the problem? Sorry for my bad English and thank you.

it doesnt insert any value at all?

Or

it insert only Zero values?

Sounds like you have the wrong field type. Show us your table structure.

Everything is fine now i just had to change type to varchar. Thanks

Sponsor our Newsletter | Privacy Policy | Terms of Service