O'Reilly Forums: Form/php /sever Or What? - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Form/php /sever Or What? NO ERROR DISPLAYED BY SEVER AND , NO CONFIRMATION MSG DISPLAYED ,

#1 User is offline   spycatcher 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 21
  • Joined: 17-January 12

Posted 26 December 2012 - 12:15 AM

hi pals . could there have been any reason why this code simply doesn't work, have crossed check if to see possible error but every thing seems to be working fine , NO ERROR DISPLAYED BY SEVER AND , NO CONFIRMATION MSG DISPLAYED , AND NO DATA STORED IN THE DB.?
what could be the possible mistake i have being making ...Help would be greatly appreciated




HTML CODE

<form action="signup.php" method="POST">
<label for="username">User name : </label>
<input type="text" name="username" id="username"/><br/>
<label for="password">Password : </label>
<input type="text" name="password" id="password"/><br/>
<input type="submit" value="submit" id="submit"/>
</form>

php script
<?php

$usr=$_POST['username'];
$pwd=$_POST['password'];

$dbc=mysqli_connect('***','***','***','***')
or die('Error connecting to MYSQL sever .');

$query= "INSERT INTO password_list(user_name,password)".
"VALUES($usr,$pwd')";

$result= mysqli_guery($dbc,$query) or die('Error querying database.');

mysqli_close($dbc);

echo"User name and password added successfully.";
?>

0

#2 User is offline   spycatcher 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 21
  • Joined: 17-January 12

Posted 27 December 2012 - 01:26 AM

View Postlemuel, on 26 December 2012 - 03:55 PM, said:

Typo: "mysqli_guery" instead the appropriate "mysqli_query"



oooh my God!!! :blink: . incredible how people look at things ...tnx lemuel,
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users