|
|
Posted by sebby.001 on 11/15/07 14:21
if any one out there can help me with this problem I would be very
greatful.
I have created a database to store new registered members to my
website but when data is sent to my database table, the entire row is
blank except for the automated id number.
I have searched in many places and have not been able to resolve this
problem.
Below is a copy of my page, the database connection is from another
page for security.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>Members</title>
<style type="text/css">
<!--
body,td,th {
font-family: Georgia, Times New Roman, Times, serif;
font-size: 12px;
}
h1 {
font-size: 18px;
padding-bottom: 2px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #CCCCCC;
font-style: normal;
}
form {
margin-left: 20px;
}
-->
</style>
<?php
require('dbConn.php');
?>
</head>
<body>
<?
if ($_GET['mode'] == "add")
{
//////////////////////////////////Register Members to
DB//////////////////////////////////////////
$sql = "INSERT INTO members
(member_id,name,address,city,county,postcode,telephone,mobile,email,username,password)
VALUES ( '', '$name', '$address', '$city', '$county', '$postcode',
'$telephone', '$mobile', '$email', '$username', '$password' )";
if ( @mysql_query($sql) )
{
echo "<hr size=1 class=dottedlinebox class=lines> <font color=0099FF
face=verdana size=2>Your have succesfully registered <b><font
color=black>".$username."</font></b> as your account!</font><hr
size=1>";
?>
<?
exit;
}else
{
echo mysql_error();
}
}
?>
</span>
<?
echo "<h2>".$msg."</h2>";
?>
<fieldset style="padding: 2">
<legend>Register</legend>
<form action="index.php?mode=add" method="post" enctype="multipart/
form-data" name="form">
<p>Name: <input type="text" name="name" class="textfield" id="name"
size="20"></p>
<p>Address: <input type="text" name="address" class="textfield"
id="address" size="20"></p>
<p>City: <input type="text" name="city" class="textfield" id="city"
size="20"></p>
<p>County: <input type="text" name="county" class="textfield"
id="county" size="20"></p>
<p>Postcode: <input type="text" name="postcode" class="textfield"
id="postcode" size="20"></p>
<p>Telephone: <input type="text" name="telephone" class="numberfield"
id="telephone" size="20"></p>
<p>Mobile: <input type="text" name="mobile" class="numberfield"
id="mobile" size="20"></p>
<p>Email: <input type="text" name="email" class="textfield"
id="email" size="20"></p>
<p>Username: <input type="text" name="username" class="textfield"
id="username" size="20"></p>
<p>Password: <input type="text" name="password" class="textfield"
id="password" size="20"></p>
<p><input type="submit" name="submit" class="form_button"><input
type="reset" value="Reset" name="reset"></p>
</form>
</fieldset></body>
</html>
Can someone tell me what I have done wrong, please!
Navigation:
[Reply to this message]
|