Jump to content

stem

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

stem's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. stem

    Need Help!!!

    i havn't had a chance to upload the new things yet :( Webhost has been down hopefully today or tomorrow the servers will be up again and i can see if it's working lol!!
  2. stem

    Need Help!!!

    login.php [code] <?php session_start(); session_unset(); session_destroy(); ?> <? session_start(); require('config.php'); include('mysql.php'); if(isset($_POST['username'])){ $username = $_POST['username']; $password = md5($_POST['password']); $getuser = "SELECT * from users WHERE username = '$username' AND password = '$password'";   $result = mysql_query($getuser) or die (mysql_error());     $r = mysql_fetch_array($result);     $qualify = mysql_num_rows($result); if($qualify > 0){ $_SESSION['username'] = $r['username']; $_SESSION['ugroup'] = $r['type']; ?> <head> <title>Events Login</title> <META HTTP-EQUIV="Refresh" content="3;url=eventlist.php"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="elder.css" rel="stylesheet" type="text/css" /> </head> <body> <p align=center>Please wait... you will now be redirected to your server page.</p> </body> </html> <? } else { print '<p align=center>Bad username/password<br>Click <a href="login.php">here</a> to return to login page.'; } } else { include('login.html'); } ?> [/code] eventlist.php [code] <?php session_start(); require('config.php'); include('mysql.php'); // Check if user is logged in if(isset($_SESSION['username']) && $_SESSION['ugroup'] == 1){ $self = $_SERVER['PHP_SELF']; echo "<table width=300 align=center>       <tr>       <td colspan=2 align=center>Add event here</td>       </tr>       <form action='changes.php' method=POST>       <tr>       <td width=100>Host:</td>       <td width=200><input type=text name=ehost></td>       </tr>       <tr>       <td width=150>Event:</td>       <td width=250><input type=text name=event></td>       </tr>       <tr>       <td width=150>Place:</td>       <td width=250><input type=text name=place></td>       </tr>       <tr>       <td colspan=2 align=center><input type=submit name=add value=\"Add Event\"></td>       </tr>       </form>       </table><hr>"; include("elist.php"); } else { print '<p align=center>Sorry... This is events Staff only Please login <a href="login.php">HERE</a></p>'; } ?> </html> [/code] install.php [Code] <?php if(isset($_POST['submit'])){ // Sql connection here require('config.php'); include('mysql.php'); $password = md5($_POST['password']); $sql = "INSERT INTO users SET         username = '".$_POST['username']."',         password = '".$password."',         ugroup = '".$_POST['ugroup']."'"; $res = mysql_query($sql); if(!$res){ echo "<b>could not insert new user!!</b><br>Error: ".mysql_error()."<br>SQL: ".$sql."<br>Click <a href=\"install.php\">HERE</a> to return to insert page"; } else { echo "New user entered into database<br>Click <a href=\"install.php\">HERE</a> to return to insert page"; } } else { ?> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Sign up</title> </head> <body> <form id="form1" name="form1" method="post" action="<?=$_SERVER['PHP_SELF']?>">   <table width="143" border="0" align="center" cellpadding="0" cellspacing="0">     <tr>       <th scope="col">Username:</th>     </tr>     <tr>       <td><label>         <input type="text" name="username" id="username" />       </label></td>     </tr>     <tr>       <th>Password:</th>     </tr>     <tr>       <td><label>         <input type="password" name="password" id="password" />       </label></td>     </tr>     <tr>       <th>Group:</th>     </tr>     <tr>       <td><label>         <div align="center">           <select name="ugroup">             <option value="1">Admin</option>             <option value="2">Staff</option>             <option value="3" selected="selected">Trainee</option>           </select>           </div>       </label>       </td>     </tr>     <tr>       <td align=center><br><label>         <input type="submit" name="submit" value="Submit" id="password" />       </label></td>     </tr>   </table> </form> <?php } ?> </body> </html> [/code]
  3. :D yay well done :) I'm glad i was some help :p
  4. stem

    Need Help!!!

    ok on login.php i have [code] $_SESSION['username'] = $r['username']; $_SESSION['ugroup'] = $r['type']; [/code] and on install.php where you select the rank i have; [Code]     <div align="center">           <select name="ugroup">             <option value="1">Admin</option>             <option value="2">Staff</option>             <option value="3" selected="selected">Trainee</option>           </select> [/code]
  5. stem

    Need Help!!!

    Ray!! omg i found the problem!! haha on the Eventslist.php you had [Code] if(isset($_SESSION['username']) && $_SESSION['ugroup'] == 1){ [/Code] i remember seeing something so i changed it and it works it should of been [code] if(isset($_SESSION['username']) && $_SESSION['ugroup'] = 1){ [/code] only 1 = sign :P
  6. stem

    Need Help!!!

    i made an account with each group and non worked if you click the link above... and log in using username: ben password: 123 you'll see it just redirects you.
  7. what do you mean? ??? if your looking for a basic page layout in html my dreamweaver puts: [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> </body> </html> [/code] if thats any use to you :) you don't really need the top bit thoe
  8. I'm not php expert and sorry if this doesn't work but.. define("SCRIPTNAME",   "Simple Member");    define("BASEHREF",   "http://www.free-php.net/demo/SimpleMember");    define("DOMAIN",   "localhost");    define("FROMEMAIL",   "drunkenmenace@gmail.com");    define("SITENAME",   "Free-Php.net");    define("INC_DIR",   "/home/www/codemunkyx/www/www.free-php.net/htdocs/demo/SimpleMember/inc/");    define("PAG_DIR",   INC_DIR."pages/");    define("INC_DB",   INC_DIR."db.php");    define("MYSQLUSER",   "[color=red]your mysql username[/color]"); // mysql username    define("MYSQLPASS",   "[color=red]your mysql passowrd[/color]"); // mysql password    define("MYSQLDB",   "[color=red]your mysql databasename[/color]");    // mysql database name    require(INC_DB); ?> try that? :p i.e.. your username is Jim password poiuytrewq and table name = members [Code] define("SCRIPTNAME",  "Simple Member");   define("BASEHREF",  "http://www.free-php.net/demo/SimpleMember");   define("DOMAIN",  "localhost");   define("FROMEMAIL",  "drunkenmenace@gmail.com");   define("SITENAME",  "Free-Php.net");   define("INC_DIR",  "/home/www/codemunkyx/www/www.free-php.net/htdocs/demo/SimpleMember/inc/");   define("PAG_DIR",  INC_DIR."pages/");   define("INC_DB",  INC_DIR."db.php");   define("MYSQLUSER",  "Jim"); // mysql username   define("MYSQLPASS",  "poiuytrewq"); // mysql password   define("MYSQLDB",  "members");    // mysql database name   require(INC_DB); ?>[/code]
  9. stem

    Need Help!!!

    Your going to probably hate me for this... but i can install fine... login fine... just when it redirects me to the events page it says click here to login!  :( any idea why? i've looked and i think it has something to do with the session? o_O i looked around and i found something like: [Code] <?php // *** Validate request to login to this site. if (!isset($_SESSION)) {   session_start(); } $loginFormAction = $_SERVER['PHP_SELF']; if (isset($_GET['accesscheck'])) {   $_SESSION['PrevUrl'] = $_GET['accesscheck']; } [/Code] Will that need to be in my events bit? it looks like it's saying the session is from the previous URL? or am i wrong? :p if you don't understand whats wrong visit these links :p http://www.habboboom.co.uk/community/staff/login.php Username => ben password => 123 ---------------------- and may i ask where is the best place to Learn Php? :o i'm taking a college course on computer programming... but we don't start php till next year i think... if we start it at all! :(
  10. stem

    Need Help!!!

    I am studying it =D and i found a few mistakes :p! i've sorted most of them out just the login.php and the install.php they both need to be validated somehow? because atm their action is just    action="" and i can't login it just keeps comming up bad password :o! and ideas? :p
  11. stem

    Need Help!!!

    Thank you so much Ray i couldn't of done this without your help  :D
  12. stem

    Need Help!!!

    ok  :D Thanks so much for your help too :)
  13. stem

    Need Help!!!

    ok now i'm guessing i have to link them together somehow? o_O with a db.php file? which allows me to connect to the database?
  14. stem

    Need Help!!!

    Ok i made the table in MyphpAdmin and the sql is [code]CREATE TABLE `event` (   `id` int(11) unsigned NOT NULL auto_increment,   `host` varchar(50) NOT NULL default '',   `event` varchar(50) NOT NULL default '',   `place` varchar(25) NOT NULL default '0',    PRIMARY KEY  (`id`) ) ENGINE=MyISAM;[/code] or should it be.. [code]CREATE TABLE `event` (   `id` int(11) unsigned NOT NULL auto_increment,   `host` varchar(50) NOT NULL auto_increment,   `event` varchar(50) NOT NULL auto_increment,   `place` varchar(25) NOT NULL auto_increment,   PRIMARY KEY  (`id`) ) ENGINE=MyISAM;[/code]
  15. stem

    Need Help!!!

    So far i have: install.php    - where i add users to the database that you posted [code] <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Sign up</title> </head> <body> <form id="form1" name="form1" method="post" action="">   <table width="143" border="0" align="center" cellpadding="0" cellspacing="0">     <tr>       <th scope="col">Username:</th>     </tr>     <tr>       <td><label>         <input type="text" name="username" id="username" />       </label></td>     </tr>     <tr>       <th>Password:</th>     </tr>     <tr>       <td><label>         <input type="password" name="password" id="password" />       </label></td>     </tr>     <tr>       <th>Group:</th>     </tr>     <tr>       <td><label>         <div align="center">           <select name="ugroup">             <option value="1">Admin</option>             <option value="2">Staff</option>             <option value="3" selected="selected">Trainee</option>           </select>           </div>       </label></td>     </tr>   </table> </form> </body> </html>[/code] -------------------------------------------- and my events page events.php [code]<html> <head> <title>HabboBoom ~ Events</title> </head> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <meta name="Description" content="HabboBoom is a ever exspanding Habbo Hotel Uk Unoffical fansite which is hoping to become Offical in the near further" /> <meta name="Keywords" content="Hab Habbo Hotel Habbo Habbo Fansites Habbo sites Habbo Community<br /> HabboBoom<br /> HB<br /> Habbo Radio<br /> Habbo Boom" /> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style> a.navilinks:link { text-decoration:none; font-weight:bold;} a.navilinks:link { text-decoration:none; font-weight:bold;} a.navilinks:link { text-decoration:none; font-weight:bold; } a.navilinks:hover { text-decoration:none; font-weight:bold; } body,td,th { font-family: Verdana; font-size: 10px; color: #CCCCCC; } body { background-image: url(background.PNG); } .option{ cursor:pointer; color:#000000; text-decoration:none; } a:link { color: #00CCFF; text-decoration: none; } a:visited { color: #00CCFF; text-decoration: none; } a:hover { color: #006699; text-decoration: underline; } a:active { color: #00CCFF; text-decoration: none; } a { font-weight: bold; #Layer1 { position:absolute; width:300px; height:300px; z-index:5; } #Layer1 { position:absolute; width:75; height:86; z-index:5; left: 904px; top: 7px; } .style3 {font-size: 9px; } .style4 {font-size: 9px; font-family: Verdana, Arial, Helvetica, sans-serif; } .style6 {font-family: Verdana, Arial, Helvetica, sans-serif; } </style> </head> <body> <center> <p>&nbsp;</p> <p>&nbsp;</p> <p><br />    <br /> </p> <table width="629" height="29" border="0" cellspacing="0">   <tr>     <td height="29" background="/images/Images/MB/top.gif">&nbsp;</td>   </tr>   <tr>     <td background="/images/Images/MB/middle.gif"><blockquote><b>Dear Habbo,       <blockquote></b>         <p align="left"><div><img width="246" height="21" src="/events_logo.gif" alt="" title=""> <font size="1"><br><br><font face="Verdana">Welcome to the Events area of HabboBOOM!</font></font></div> <div><font size="1"><font face="Verdana">We have taken the time to plan events, for all you lovely habbos!</font></font></div> <div><font size="1"><font face="Verdana"> Below are the planned events!!&nbsp;</font></font></div><br><br><br> <img style="margin: 0px;" width="49" height="96" align="right" src="/tele_ani.gif" alt="" title=""> <br> <table style="border-collapse: collapse;" width="436" cellspacing="0" cellpadding="3" bordercolor="#000000" border="0" bgcolor="#79cdcd"><tbody><tr><td width="33%" valign="top"> <div><font color="#660066"><strong>Event Host&nbsp;</strong></font></div></td><td width="33%" valign="top"> <div><font color="#660066"><strong>Event Type&nbsp;</strong></font></div></td><td width="33%" valign="top"> <div><font color="#660066"><strong>Time/Location/Day&nbsp;</strong></font></div></td></tr><tr><td width="33%" valign="top" bgcolor="#325c74"> <div><font color="#ccff33">MacJonas&nbsp;</font></div></td><td width="33%" valign="top" bgcolor="#325c74"> <div><font color="#ccff33">Giveaway&nbsp;</font></div></td><td width="33%" valign="top" bgcolor="#325c74"> <div><font color="#ccff33">Unkown&nbsp;</font></div></td></tr><tr><td width="33%" valign="top" bgcolor="#325c74"> <div><font color="#ccff33">MacJonas</font></div></td><td width="33%" valign="top" bgcolor="#325c74"> <div><font color="#ccff33">Kick Wars CONTEST!</font></div></td><td width="33%" valign="top" bgcolor="#325c74"> <div><font color="#ccff33">7 PM Wednesday, MacJonas room!</font></div></td></tr><tr><td width="33%" valign="top" bgcolor="#325c74"> <div><font color="#ccff33">&nbsp;</font></div></td><td width="33%" valign="top" bgcolor="#325c74"> <div><font color="#ccff33">&nbsp;</font></div></td><td width="33%" valign="top" bgcolor="#325c74"> <div><font color="#ccff33">&nbsp;</font></div></td></tr><tr><td width="33%" valign="top" bgcolor="#325c74"> <div><font color="#ccff33">&nbsp;</font></div></td><td width="33%" valign="top" bgcolor="#325c74"> <div><font color="#ccff33">&nbsp;</font></div></td><td width="33%" valign="top" bgcolor="#325c74"> <div><font color="#ccff33">&nbsp;</font></div></td></tr></tbody></table> </span><br />         </p>         <p align="left">&nbsp;</p>       </blockquote>      </td>   </tr> </table> <table width="629" border="0" cellpadding="0" cellspacing="0">   <tr>     <td align="center" valign="middle" scope="col"><div align="left">       <div align="center">         <p>| <a href="http://www.habboboom.co.uk/jobapp.php" target="_blank">Job Applications</a> |</p>       </div>     </div></td>     <td align="center" valign="middle" scope="col"><div align="center">       <p class="navilinks style3"> <a href="http://www.habboboom.co.uk/disclaimer.php" target="_blank">Disclaimer</a></p>     </div></td>     <td align="center" valign="middle" scope="col"><div align="center">       <p class="navilinks style3">| <a href="/forum/" target="_blank">Forum</a></p>     </div></td>     <th scope="col"><p>&nbsp;</p>   </tr>   <tr>     <th width="116" scope="col">&nbsp;</th>     <th width="60" scope="col">&nbsp;</th>     <th width="55" scope="col">&nbsp;</th>     <th width="398" scope="col">&nbsp;</th>   </tr> </table> </body> </html> </body> </html>[/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.