Oh, I see... it looks as though you've copied and pasted the script from somewhere and missed a big chunk off the top.
Printable View
Oh, I see... it looks as though you've copied and pasted the script from somewhere and missed a big chunk off the top.
Not quite,
I wrote it by looking at another script. Some of it was changed, All i want it to do is ask for the db username, Password, And DB and create the tabel.
Twey you have any ideaaa on how to fix this???
where is the if part for theif it exist before the <form></form> script then u shouldPHP Code:}else{ $muser = $_POST['muser']; $mpass = $_POST['mpass']; $mdata = $_POST['mdata']
i think.... :pPHP Code:</form><? } else {
// the rest of the code here
?>
Dont see it...
what dont u see?
the if part for the else clause or what m referring to? :p
I dont seeAnd the if part... Is the if part this?:Code:</form><? } else {
// the rest of the code here
?>
Code:if(empty($muser) || empty($mpass) || empty($mdata)){
Echo"<b>Error:</b> You have some boxes with No info in them, You MUST fill in EVERY BOX!";
die();
}
the script should like something like :
dunno how to highlight the correction(s) that i think should be corrected? (redundant huh?) :DPHP Code:<?if (condition) { ?>
<form method='post' action='install.php?step=1'>
<table>
<tr>
<td>MySQL User:</td>
<td><input type='text' name='muser' size='20'></td>
</tr>
<tr>
<td>MySQL Password:</td>
<td><input type='text' name='mpass' size='20'></td>
</tr>
<tr>
<td>MySQL Database:</td>
<td><input type='text' name='mdata' size='20'></td>
</tr>
<tr>
<td>Make sure all the above info is correct.</td>
<td><input type='submit' name='submit' value='Submit'></td>
</tr>
</table>
</form><?
}else{
$muser = $_POST['muser']; $mpass = $_POST['mpass'];
$mdata = $_POST['mdata'];
}
if(empty($muser) || empty($mpass) || empty($mdata) ||{
Echo"<b>Error:</b> You have some boxes with No info in them, You MUST fill in EVERY BOX!";
die();
}
// Connect to Check
mysql_connect ("localhost", "$muser", "$mpass") or die(mysql_error());
mysql_select_db ("$mdata");
// Create Tables
mysql_query("CREATE TABLE `request` (
`Habbo Name` varchar(20) NOT NULL default '',
`Song Request` varchar(50) NOT NULL default '',
`Shoutout\Joke` varchar(10) NOT NULL default '',
PRIMARY KEY (`Habbo Name`)
) TYPE=MyISAM") or die(mysql_error()); ?>
And what should the condition be, cause i'm stupid...
if that is the case, that if part should be before the else part :p