[SOLVED] While
Posted: Sun Jul 18, 2004 11:23 pm
Not sure if this is classified databases, but here goes.
Im checking to see if there is a username already registered that is the same as the user put in. I want it so that once it finds that it is taken, it will stop. When I use this code i get
Line 46 is:
Code: Select all
<?php
$uname = "0";
$db = mysql_connect("localhost","username","password");
mysql_select_db("sevengfx_com_-_hosted" , $db) or die("Couldn't open $db: ".mysql_error());
$sql = "SELECT * FROM support_users";
$result=mysql_query($sql);
while ($row = mysql_fetch_array($result)){
if ($username == $row['username']{
while ($uname != "1"){
echo '<font color="red">That username is already taken. Please create a new one.</font>';
$_SESSION['used'] = "1";
include 'form.php';
$uname = "1";
} else {
}
}
?>Code: Select all
Parse error: parse error in /var/www/html/formmail1.php on line 46Code: Select all
<?php
while ($uname != "1"){
?>