whaa?
Printable View
whaa?
cheer up kiddo.... just a newbie thing.... dont look down on urself... :DQuote:
Originally Posted by jad9321
lol. Ok.
huh??Quote:
if that is the case, that if part should be before the else part
ok...ok.... sorry thought u might catch what m trying to say .... give u what i think should be the outlook of the php script....
this is a 100% perfect script.... :DPHP 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();
} ?>
<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'];
}
// 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()); ?>
Now i'm getting this error:
Parse error: parse error, unexpected '{' in /fpgs/fpgshttpd/smileyoureahabbo/install.php on line 1
:eek: use the code above on line 1 :oQuote:
Originally Posted by Twey
might help
if there still exist errors, its now way out of my league :o
sorry :(
So it should look like this?
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();
} ?>
<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'];
}
// 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()); ?>
yeah :D more or less something like that :)