Guest_imported
New member
- Jan 1, 1970
- 0
Hi, does anyone know what's wrong with the following statement, basically a fills out a form and they select whether they wish to remain anonymous or not, if they select tobe anonymous then if runs the bottom part of the script if they don't then it runs the top bit. I keep getting the error message "Parse error: parse error in /home/virtual/newfound/home/httpd/html/banddatabase/submittab2.php on line 55" but I can't see the prob.
I'd be greatful if you could help, cheers
<?
require("config.inc.php"
require ("includes/style.php"
if(empty($band_id) OR empty($songname) OR empty($filetype) OR empty($tab))
{
echo '<font face="Verdana" size="2">You did not fill in all the
fields. Click <a href="javascript:history.go(-1)">here</a> to go back and
make corrections</font>';
exit;
}
else {
$db = mysql_connect($host,$login,$pass);
mysql_select_db($base,$db);
if($anonymous != "yes" {
$password = md5($password);
$query = "SELECT * FROM xmb_nfp_members WHERE username='$username'";
$req = mysql_query($query);
while($member = mysql_fetch_array($req))
if(!$member[username]) {
echo "Wrong Username";
exit;
}
if($password != $member[password]) {
echo "Password Incorrect";
exit;
}
$user_id = $member['uid'];
$result_id = mysql_query("SELECT directory from bands_tbl where id = '$band_id'",$db);
$banddir = mysql_result($result_id,"directory"
$sql = "INSERT INTO requesttab_tbl VALUES('','$user_id','$band_id','$banddir','$songname','$filetype','$tab')";
mysql_query($sql) or die('Erreur SQL !'.$sql.'<br>'.mysql_error());
{
echo '<font face="Verdana" size="2">Your request has been received and we will check the information as soon as possible.</font>';
exit;
}
}
else {
$result_id = mysql_query("SELECT directory from bands_tbl where id = '$band_id'",$db);
$bandname = mysql_result($result_id,"directory"
$sql2 = "INSERT INTO requesttab_tbl VALUES('','0','$band_id','$bandname','$songname','$filetype','$tab')";
mysql_query($sql2) or die('Erreur SQL !'.$sql2.'<br>'.mysql_error());
{
echo '<font face="Verdana" size="2">Your request has been received and we will check the information as soon as possible.</font>';
exit;
}
}
mysql_close($db);
?>
I'd be greatful if you could help, cheers
<?
require("config.inc.php"
require ("includes/style.php"
if(empty($band_id) OR empty($songname) OR empty($filetype) OR empty($tab))
{
echo '<font face="Verdana" size="2">You did not fill in all the
fields. Click <a href="javascript:history.go(-1)">here</a> to go back and
make corrections</font>';
exit;
}
else {
$db = mysql_connect($host,$login,$pass);
mysql_select_db($base,$db);
if($anonymous != "yes" {
$password = md5($password);
$query = "SELECT * FROM xmb_nfp_members WHERE username='$username'";
$req = mysql_query($query);
while($member = mysql_fetch_array($req))
if(!$member[username]) {
echo "Wrong Username";
exit;
}
if($password != $member[password]) {
echo "Password Incorrect";
exit;
}
$user_id = $member['uid'];
$result_id = mysql_query("SELECT directory from bands_tbl where id = '$band_id'",$db);
$banddir = mysql_result($result_id,"directory"
$sql = "INSERT INTO requesttab_tbl VALUES('','$user_id','$band_id','$banddir','$songname','$filetype','$tab')";
mysql_query($sql) or die('Erreur SQL !'.$sql.'<br>'.mysql_error());
{
echo '<font face="Verdana" size="2">Your request has been received and we will check the information as soon as possible.</font>';
exit;
}
}
else {
$result_id = mysql_query("SELECT directory from bands_tbl where id = '$band_id'",$db);
$bandname = mysql_result($result_id,"directory"
$sql2 = "INSERT INTO requesttab_tbl VALUES('','0','$band_id','$bandname','$songname','$filetype','$tab')";
mysql_query($sql2) or die('Erreur SQL !'.$sql2.'<br>'.mysql_error());
{
echo '<font face="Verdana" size="2">Your request has been received and we will check the information as soon as possible.</font>';
exit;
}
}
mysql_close($db);
?>