Jump to content

Help


prcollin

Recommended Posts

I have the following code as my login.php

 

<?php

$host="localhost";
$user="xxxxx_xxxxllin";
$passwd="xxxxxxx17";
$database="fxxx_Usxxs";

$con = mysql_connect("$host", "$user", "$passwd", "$database");
mysql_select_db("fixxxxx_xxxx", $con);

$sql="insert into newuser (user_name, user_pass, full_name, user_email, confirm_email, alt_email, user_city)
Values
('$_post[user_name]','$_post[user_pass]','$_post[full_name]','$_post[user_email]','$_post[confirm_memail]','$_post[alt_email]','$_post[user_city]";
echo "1 record added";
mysql_close($con)
?>

 

And my html code is this

 

<html>
<body>
<form action="login.php" method="post">
Username: <input type="text" name="username">
Password: <input type="password" name="password">
Full Name: <input type="text" name="name">
E-Mail : <input type="text" name="useremail">
Confirm E-mail: <input type="text" name="confirmemail">
Alt Email: <input type="text" name="altemail">
City: <input type="text" name="city">
<input type="submit" />

 

They are two separate files.  I know there is no security or anything I am just trying to get stuff to post to the db cause I am new to MySQL.  If you could help me find out what I did wrong or suggest a better way that would be great.  PHP 5 and MySQL 4.1.22

 

Im not getting any connect errors when i click submit but the info isnt posting to the db.

Link to comment
https://forums.phpfreaks.com/topic/107484-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.