Jump to content

djclewes

Members
  • Posts

    22
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

djclewes's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. its ok i done it but in future how am i ment to do that. on other forums you have html buttons which you pu your code in and it makes it look as it does on note pad. on here you only have that feature i used above. also i am new.
  2. hi this php script is not working for me. just wont create tbles. here is the db php code. not my database details these are default ones
  3. when clicking on the users link it displays no users but if you do it like this http://mysite.com/profile.php?id=415 it displays peoples profile. so how do i fix this problem. attached the file show_user.php
  4. got it working and i got it working on my script thank you. everything is falling into place nicely.
  5. to many connections is what i get there
  6. i look in phpadmin and it does not show any users in the databse. it also when you try and login does not take you to area.php. feel free to try and register your self at chatanrelax.co.uk
  7. here is my code and i need help with why it is not letting people register or login. Once logged in i want it to take the logged in users to area.php. any help will be appriciated. <?php session_start(); ob_start(); //Include the database connection file include "config.php"; //Check to see if the submit button has been clicked to process data if(isset($_POST["submitted"]) && $_POST["submitted"] == "yes") { //Variables Assignment $username = trim(strip_tags($_POST['username'])); $user_password = trim(strip_tags($_POST['passwd'])); $encrypted_md5_password = md5($user_password); $validate_user_information = mysql_query("select * from `friendship_system_users_table` where `username` = '".mysql_real_escape_string($username)."' and `password` = '".mysql_real_escape_string($encrypted_md5_password)."'"); //Validate against empty fields if($username == "" || $user_password == "") { $error = '<br><div class="info">Sorry, all fields are required to log into your account. Thanks.</div><br>'; } elseif(mysql_num_rows($validate_user_information) == 1) //Check if the information of the user are valid or not { //The submitted info of the user are valid therefore, grant the user access to the system by creating a valid session for this user and redirect this user to the welcome page $get_user_information = mysql_fetch_array($validate_user_information); $_SESSION["VALID_USER_ID"] = $username; $_SESSION["USER_FULLNAME"] = strip_tags($get_user_information["fullname"]); header("location: area.php"); } else { //The submitted info the user are invalid therefore, display an error message on the screen to the user $error = '<br><div class="info">Sorry, you have provided incorrect information. Please enter correct user information to proceed. Thanks.</div><br>'; } } ?> <!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=utf-8" /> <title>A Cool Login System With PHP MySQL &amp jQuery | Tutorialzine demo</title> <link rel="stylesheet" type="text/css" href="demo.css" media="screen" /> <link rel="stylesheet" type="text/css" href="login_panel/css/slide.css" media="screen" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <!-- PNG FIX for IE6 --> <!-- http://24ways.org/2007/supersleight-transparent-png-in-ie6 --> <!--[if lte IE 6]> <script type="text/javascript" src="login_panel/js/pngfix/supersleight-min.js"></script> <![endif]--> <script src="login_panel/js/slide.js" type="text/javascript"></script> </head> <body> <!-- Panel --> <div id="toppanel"> <div id="panel"> <div class="content clearfix"> <div class="left"> <p><img alt="" height="136" src="http://chatanrelax.co.uk/images/logo.gif" width="205" /></p> </div> <div class="left"> <!-- Login Form --> <center> <div class="vpb_main_wrapper"> <br clear="all"> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <div style="width:115px; padding-top:10px;float:left;" align="left">Your Username:</div> <div style="width:300px;float:left;" align="left"> <input type="text" name="username" id="username" value="" class="auto-style1" style="width: 223px"></div><br clear="all"><br clear="all"> <div style="width:115px; padding-top:10px;float:left;" align="left">Your Password:</div> <div style="width:300px;float:left;" align="left"> <input type="password" name="passwd" id="passwd" value="" class="auto-style1" style="width: 223px"></div><br clear="all"><br clear="all"> <div style="width:300px;float:left;" align="left"> <input type="hidden" name="submitted" id="submitted" value="yes"> <input type="submit" name="submit" value="Login" style="margin-right:50px;" class="bt_login"> </div> </form> <br clear="all"><br clear="all"> <div style="width:450px;float:left;" align="left"><?php echo $error; ?></div><br clear="all"> </div> </center> </div> <div class="left right"> <!-- Register Form --> <center> <div class="vpb_main_wrapper"> <br clear="all"> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <div style="width:115px; padding-top:10px;float:left;" align="left">Your Username:</div> <div style="width:300px;float:left;" align="left"> <input type="text" name="username" id="username" value="<?php echo strip_tags($_POST["username"]); ?>" class="vpb_textAreaBoxInputs" style="width: 223px"></div><br clear="all"><br clear="all"> <div style="width:115px; padding-top:10px;float:left;" align="left">Email Address:</div> <div style="width:300px;float:left;" align="left"> <input type="text" name="email" id="email" value="<?php echo strip_tags($_POST["email"]); ?>" class="vpb_textAreaBoxInputs" style="width: 223px"></div><br clear="all"><br clear="all"> <div style="width:115px; padding-top:10px;float:left;" align="left">Desired Password:</div> <div style="width:300px;float:left;" align="left"><input type="password" name="passwd" id="passwd" value="" class="vpb_textAreaBoxInputs" style="width: 223px"></div><br clear="all"><br clear="all"> <input type="submit" name="submit" id="" value="Register" class="bt_register"> <input type="hidden" name="submitted" id="submitted" value="yes"> </form> <br clear="all"><br clear="all"> <div style="width:450px;float:left;" align="left"><?php echo $error; ?></div><br clear="all"> </div> </center> <!-- Code Ends --> </div> </div> </div> <!-- /login --> <!-- The tab on top --> <div class="tab"> <ul class="login"> <li class="left"> </li> <li>Hello Guest!</li> <li class="sep">|</li> <li id="toggle"> <a id="open" class="open" href="#">Log In | Register</a> <a id="close" style="display: none;" class="close" href="#">Close Panel</a> </li> <li class="right"> </li> </ul> </div> <!-- / top --> </div> <!--panel --> <div class="pageContent"> <div id="main"> <div class="container"> </div> <div class="container"> <div class="clear"></div> </div> </div> </div> </body> </html>
  8. Hi i have 2 days setup so far but when i go to add more days the script does not work. can you please tell me how to add a extra 5 days to the below script please. <html> <head> <meta http-equiv="refresh" content="180"> </head> <body> <?php //set timezone putenv ('GMT=Europe/London'); mktime(0,0,0,1,1,1970); $day = date("n"); $time = date("Hi"); if ($day == 7) { switch($time) { case ($time >= '0000' && $time <= '0459'): echo"<img src='http://lcradio.co.uk/presenters/blazey.png' class='onair'/>"; break; case ($time >= '0500' && $time <= '0600'): echo"<img src='http://lcradio.co.uk/presenters/gilly.png' class='onair'/>"; break; case ($time >= '0600' && $time <= '0900'): echo"<img src='http://lcradio.co.uk/presenters/stephen.png' class='onair'/>"; break; case ($time >= '0900' && $time <= '1200'): echo"<img src='http://lcradio.co.uk/presenters/homer.gif'class='onair'/>"; break; case ($time >= '1200' && $time <= '1400'): echo"<img src='http://lcradio.co.uk/presenters/gilly.png' class='onair'/>"; break; case ($time >= '1400' && $time <= '1600'): echo"<img src='http://lcradio.co.uk/presenters/rich.png'class='onair'/>"; break; case ($time >= '1600' && $time <= '1800'): echo"<img src='http://lcradio.co.uk/presenters/blazey.png' class='onair'/>"; break; case ($time >= '1800' && $time <= '2000'): echo"<img src='http://lcradio.co.uk/presenters/martan.png'class='onair'/>"; break; case ($time >= '2000' && $time <= '2400'): echo"<img src='http://lcradio.co.uk/presenters/gilly.png'class='onair'/>"; break; default: echo"<img src='http://lcradio.co.uk/presenters/blazey.png' alt='On-Air Now' class='onair'/>"; break; } } elseif($day == 6) { echo"<img src='http://lcradio.co.uk/presenters/rich.png'alt='KNAS' class='onair'/>"; } else { switch($time) { case ($time >= '0000' && $time <= '0459'): echo"<img src='http://lcradio.co.uk/presenters/gilly.png' class='onair'/>"; break; case ($time >= '0500' && $time <= '0600'): echo"<img src='http://lcradio.co.uk/presenters/stephen.png'class='onair'/>"; break; case ($time >= '0600' && $time <= '0900'): echo"<img src='http://lcradio.co.uk/presenters/blazey.png' class='onair'/>"; break; case ($time >= '0900' && $time <= '1200'): echo"<img src='http://lcradio.co.uk/presenters/rich.png'class='onair'/>"; break; case ($time >= '1200' && $time <= '1400'): echo"<img src='http://lcradio.co.uk/presenters/stephen.png'class='onair'/>"; break; case ($time >= '1400' && $time <= '1600'): echo"<img src='http://lcradio.co.uk/presenters/homer.gif'class='onair'/>"; break; case ($time >= '1600' && $time <= '1800'): echo"<img src='http://lcradio.co.uk/presenters/stephen.png'class='onair'/>"; break; case ($time >= '1800' && $time <= '2000'): echo"<img src='http://lcradio.co.uk/presenters/martan.png'class='onair'/>"; break; case ($time >= '2000' && $time <= '2400'): echo"<img src='http://lcradio.co.uk/presenters/homer.gif' class='onair'/>"; break; } } ?> </body> </html>
  9. i think it be better if you all just visited the link http://lcradio.co.uk/test/djadmin.htm
  10. i am getting <? echo $_SESSION['currentname']; ?> <? echo $_SESSION['currentnickname']; <? echo $_SESSION['currentdesc']; ?> <? echo $_SESSION['lastupded']; ?> errors
  11. ok try again i need help creating the two tables below in MySQL... TABLE1: presenters FIELDS: ID (auto-increment) djname (text) djnickname (text) djdesc (text) djpicture (text) djshowpicture (text) TABLE2: shifts FIELDS: ID (auto-increment) presenter (INT) day (text) hours (text)
  12. Do you have a specific question? yeah io need to know how to create a database query to get the following script to work i am new to mysql so thats why i am posting the code. can you help create the query for it please <OPTION VALUE="Enter new DJ NAME...">Add New DJ!</OPTION> </select> </td> </tr> <tr> <td align="right">DJ&#39;s Full Name: </td> <td align="left"> <input type='text' id='djName' name='djName' size='35' value="<? echo $_SESSION['currentname']; ?>" /> </td> </tr> <tr> <td align="right">DJs Nickname:</td> <td align="left"><input name='djDescription' type='text' id='djNickname' size='35' maxlength="100" value="<? echo $_SESSION['currentnickname']; ?>" /></td> </tr> <tr> <td align="right">Description:</td> <td align="left"><input name='djDescription' type='text' id='djDescription' size='35' maxlength="100" value="<? echo $_SESSION['currentdesc']; ?>" /></td> </tr> <tr> <td align="right">DJs Picture:</td> <td align="left"><input type='file' id='djpicture' name='djpicture' size='35' value="<? echo $_SESSION['currentpicture']; ?>" /></td> </tr> <tr> <td align="right">DJs Show Promo Picture:</td> <td align="left"><input type='file' id='promopicture' name='promopicture' size='35' value="<? echo $_SESSION['currentpromopicture']; ?>" /></td> </tr> <tr> <td align="right">Add New Scheduled Shift for this DJ:</td> <td> <select id="djNewDay" name="djNewDay"> <option value="1">Sunday</option> <option value="2">Monday</option> <option value="3">Tuesday</option> <option value="4">Wednesday</option> <option value="5">Thurday</option> <option value="6">Friday</option> <option value="7">Saturday</option> </select> <select id="djNewShift" name="djNewShift"> <option value="0000">0000 to 0600</option> <option value="0600">0600 to 0900</option> <option value="0900">0900 to 1200</option> <option value="1200">1200 to 1400</option> <option value="0000">1400 to 1600</option> <option value="0000">1600 to 1800</option> <option value="0000">1800 to 2000</option> <option value="0000">2000 to 2100</option> <option value="0000">2100 to 2200</option> <option value="0000">2200 to 2400</option> </select> <input type="submit" name="addschedule" value="Add New Schedule for this DJ!"> </td> </tr> <tr> <td align="right"> Updated On:</td> <td align="left"><input type='text' id='lastUpdated' name='lastUpdated' size='35' value="<? echo $_SESSION['lastupded']; ?>" readonly /></td> </tr> <tr> <td align="center" colspan="2" height="40"><input type="submit" id="updateDJ" name="updateDJ" value="Update This DJ!" /> <input type="submit" id="deleteDJ" name="deleteDJ" value="Delete This DJ!" /></td> </tr> </table>
  13. Hi i am needing help creating a database which will work with the following code. can anyone help <OPTION VALUE="Enter new DJ NAME...">Add New DJ!</OPTION> </select> </td> </tr> <tr> <td align="right">DJ&#39;s Full Name: </td> <td align="left"> <input type='text' id='djName' name='djName' size='35' value="<? echo $_SESSION['currentname']; ?>" /> </td> </tr> <tr> <td align="right">DJs Nickname:</td> <td align="left"><input name='djDescription' type='text' id='djNickname' size='35' maxlength="100" value="<? echo $_SESSION['currentnickname']; ?>" /></td> </tr> <tr> <td align="right">Description:</td> <td align="left"><input name='djDescription' type='text' id='djDescription' size='35' maxlength="100" value="<? echo $_SESSION['currentdesc']; ?>" /></td> </tr> <tr> <td align="right">DJs Picture:</td> <td align="left"><input type='file' id='djpicture' name='djpicture' size='35' value="<? echo $_SESSION['currentpicture']; ?>" /></td> </tr> <tr> <td align="right">DJs Show Promo Picture:</td> <td align="left"><input type='file' id='promopicture' name='promopicture' size='35' value="<? echo $_SESSION['currentpromopicture']; ?>" /></td> </tr> <tr> <td align="right">Add New Scheduled Shift for this DJ:</td> <td> <select id="djNewDay" name="djNewDay"> <option value="1">Sunday</option> <option value="2">Monday</option> <option value="3">Tuesday</option> <option value="4">Wednesday</option> <option value="5">Thurday</option> <option value="6">Friday</option> <option value="7">Saturday</option> </select> <select id="djNewShift" name="djNewShift"> <option value="0000">0000 to 0600</option> <option value="0600">0600 to 0900</option> <option value="0900">0900 to 1200</option> <option value="1200">1200 to 1400</option> <option value="0000">1400 to 1600</option> <option value="0000">1600 to 1800</option> <option value="0000">1800 to 2000</option> <option value="0000">2000 to 2100</option> <option value="0000">2100 to 2200</option> <option value="0000">2200 to 2400</option> </select> <input type="submit" name="addschedule" value="Add New Schedule for this DJ!"> </td> </tr> <tr> <td align="right"> Updated On:</td> <td align="left"><input type='text' id='lastUpdated' name='lastUpdated' size='35' value="<? echo $_SESSION['lastupded']; ?>" readonly /></td> </tr> <tr> <td align="center" colspan="2" height="40"><input type="submit" id="updateDJ" name="updateDJ" value="Update This DJ!" /> <input type="submit" id="deleteDJ" name="deleteDJ" value="Delete This DJ!" /></td> </tr> </table>
  14. i have fixed this problem now but i am looking for someone who can create a footer bar like face book with a online pop up one on one chat box like facebook and it needs to be integrated with prochat and look a bit like the prochat footerbar. this is a future creation i need when i have the money. but i would like people to leave quotes now so when funds are there i can get it straight away.
  15. sorry i am new to php ive used html and htm but not php i think im guna need to pay someone to do this where is the freelance section.
×
×
  • 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.