Jump to content

dazzathedrummer

Members
  • Posts

    101
  • Joined

  • Last visited

Everything posted by dazzathedrummer

  1. Just nudging this Does anyone have this running properly?? Seems to be a bit of a nightmare problem according to my google findings - I had it working fine in an earlier version of Dreamweaver on PC. D
  2. Hi, I wonder if anyone can help, I used to have this working fine on a PC, I've now got a Macbook Pro and cant get it working again. I want to be able to view my php based website in liveview in dreamweaver CS4 but I cant figure out how to configure the testing server. The site is on a remote server, I have the 'site' configured correctly to FTP to that ok. I've got MAMP running on the Mac, I want it to run the php and query the online database to update the liveview. I've got the Testing server settings set to local - do I need to put the site in the HTDOCS folder??
  3. anyone got any ideas about this?? should I post this in the php area?? thanks, Darren
  4. Ahh, brilliant! Its the padding - the calendar pic is made up of three layered images that are put together with php - so if I remove the 'position:absolute' they all apear side by side. The padding on the text element does the job though! Just one more small thing that i'm now having trouble with, the first calendar pic in the repeated entry appears to be lower than the rest - I cant figure out why this is?? http://www.the-guards.co.uk/gigstest.php here's the php that drives the list : - while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {echo "<img height=\"79px\" width=\"79px\" valign=\"bottom\" alt=\"calendarpic\" style=\"position:absolute; vertical-align:bottom; z-index:1;\" src=\"../private/calpics/background.png\" hspace=\"6\" vspace=\"75\" align=\"left\"\"/> <img height=\"79px\" width=\"79px\" valign=\"top\" alt=\"calendarpic1\" style=\"position:absolute; vertical-align:top; z-index:2;\" src=\"../private/calpics/{$row['day']}.png\" hspace=\"6\" vspace=\"75\" align=\"left\"\"/> <img height=\"79px\" width=\"79px\" valign=\"top\" alt=\"calendarpic2\" style=\"position:absolute; vertical-align:top; z-index:3;\" src=\"../private/calpics/{$row['month']}.png\" hspace=\"6\" vspace=\"75\" align=\"left\"\"/></td><br><br><br> ". "<h1 class=\"border_3\"><span style=\"padding-left:85px;\">{$row['gl_venue']}</span></h1>". "<p><span style=\"padding-left:85px;\">{$row['gl_text']}</span></p>". "<p><a onclick=\"window.location.href='http://maps.google.co.uk/maps?f=q&source=s_q&hl=en&geocode=&q={$row['gl_postcode']}'\">Click for map</a></p>"; } The calendar pic in the first entry is actually in the correct place, the others are too high (I'll pad the text to fit around that now I know how too!!) thanks Darren
  5. Hi, Sorry!! we switched our hosting to a different domain yesterday, these should work : - This is the static page with the correct 'look': - http://www.the-guards.co.uk/gigs.html and this is what i've got so far: - http://www.the-guards.co.uk/gigstest.php thanks, Darren
  6. Hi, If this is posted to the wrong page - please do shoot me down in flames lol. I'm trying to write a page that shows a dynamic giglist, I can get the data to run, I'm just having trouble with the CSS formatting side - i've been playing around with different variables for a while now but I cant get the page to look right. This is the static page with the correct 'look': - http://www.the-guards.org.uk/gigs.html and this is what i've got so far: - http://www.the-guards.org.uk/gigstest.php this is the static code: - <blockquote> <h1 align="left" class="border_3"><img src="Images/July_31.png" alt="July 31" width="79" height="78" hspace="6" vspace="6" align="left" />Private function</h1> <p align="left"> </p> <p align="left"> </p> <h1 align="left" class="border_3"><img src="Images/Aug_01.png" alt="August 01" width="79" height="78" hspace="6" vspace="6" align="left" />Private function</h1> <p align="left"> </p> <p align="left"> </p> <p align="left"></p> <h1 align="left" class="border_3"><img src="Images/6_august.png" alt="6 August" width="79" height="78" hspace="3" vspace="3" align="left" />The Dragon</h1> <p align="left">The Dragon in Werrington is a great venue. The Guards had a storming gig last time largely thanks to our friends who came down. Many of our friends drink in The Dragon and always turn out for us. It's a great gig and the atmosphere is buzzing. The Dragon is Rob's old local and it's fair to say that he pulls out all the stops when he returns. See you there.</p> <p align="left"><a href="http://maps.google.co.uk/maps?f=q&source=s_q&hl=en&geocode=&q=The+Dragon+Werrington+peterborough&sll=52.575258,-0.24156&sspn=0.000296,0.000648&ie=UTF8&cd=1&hq=The+Dragon&hnear=Werrington,+Peterborough,+UK&t=h&z=14&layer=c&cbll=52.628144,-0.278764&panoid=KLFCKialTA5w5D81lcYPvg&cbp=12,297.64,,0,-5.92" title="The Dragon" target="_blank">Click for map to venue</a></p> and here's what i've written to try and copy the layout: - <?php // Connects to your Database include 'connect_include.php'; $query = "SELECT (left(LCASE(monthname(gl_date)),3)) as 'month', day(gl_date) as 'day',gl_date, gl_venue, gl_venue, gl_city, gl_postcode, gl_phone, gl_contact, gl_net, gl_comments, gl_text FROM tg_gig_list where gl_date > curdate() and gl_publish = 1 order by gl_date asc"; $result = mysql_query($query); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {echo "<img height=\"79px\" width=\"79px\" valign=\"bottom\" alt=\"calendarpic\" style=\"position:absolute; vertical-align:bottom; z-index:1;\" src=\"../private/calpics/background.png\" hspace=\"6\" vspace=\"75\" align=\"left\"\"/> <img height=\"79px\" width=\"79px\" valign=\"top\" alt=\"calendarpic1\" style=\"position:absolute; vertical-align:top; z-index:2;\" src=\"../private/calpics/{$row['day']}.png\" hspace=\"6\" vspace=\"75\" align=\"left\"\"/> <img height=\"79px\" width=\"79px\" valign=\"top\" alt=\"calendarpic2\" style=\"position:absolute; vertical-align:top; z-index:3;\" src=\"../private/calpics/{$row['month']}.png\" hspace=\"6\" vspace=\"75\" align=\"left\"\"/></td><br><br><br> ". "<h1 class=\"border_3\">{$row['gl_venue']}</h1>". "<p>{$row['gl_text']}</p>". "<p><a onclick=\"window.location.href='http://maps.google.co.uk/maps?f=q&source=s_q&hl=en&geocode=&q={$row['gl_postcode']}'\">Click for map</a></p>"; } ?> The main problem is getting the calendar image to sit over the heading like in the static page. What do I need to do? i'm sure i'm really close to the solution - help would be much appreciated. Darren
  7. Hi, first of all apologies if this is in the wrong place. I have a website for my band (that i've built some nice back end management tools for thanks to this forum), we are getting an increasing number of gigs for individuals and companies and we would like to be able to bill through the website. My initial thoughts are: - -Create a 'Your checkout.php' page that displays paypal button code for that user -Email the customer their login password and tell them that their email address is their user name (maybe take them to a 'complete your details' page) - they pay, redirect to a 'thanks.php' I already have a secure login system that I currently use for band members (purely because there is no public content) that I can extend to customers. This is my first idea on the subject, i'm just wondering if the above sounds sensible?? Is paypal a good facilitator to use??
  8. ah ok, so its more efficient to have a database with sat 100 fields, each containing 1 or 0 than to have one field with a string of 100 chars. Ok, in that case its I dont need to concatenate the form results. Thanks!!
  9. Hi, I'm writing a simple checklist for monitoring workflow. It will be a form, a list of tasks with radio buttons that return '0' or '1'. I'm planning to store the results in a MySql db, i'm just wondering what the best way to do this is. My initial thoughts are to store the results as a string in one field in the db (like '11100100010' etc) and then split that out to feed the form using LEFT in the query (LEFT(Field, 3) as 'Job 3' or something like that). If that is a sensible way to do it - how do I go about creating the string from the 'submit', i mean, i understand how to update the DB, thats fine - I'm just not to sure how to create a string from several form elements??
  10. Hi, I realise that this is a very basic thing but what is the best way to store a query result as an array and then call each cell individually as oppose to part of a loop? for exaple: If I have a query that returns a dataset of 2 columns and three rows as an associative array how do I then echo say, row 2, column 2 within a line of html? I've spent ages looking through search results - it seems all the answers are way too complex for my basic needs!
  11. ok i've done it!!!!! www.the-guards.org.uk/private/calendar.php and here's the code for anyone that wants to use it: - <style type="text/css"> <!-- a:link{ text-decoration: none; color: white; } a:visited{ text-decoration: none; color: white; } a:hover{ text-decoration: none; color: white; font-weight: bolder; } .gig_day { font-weight: bolder; color: white; background-color: red; text-align: center; text-decoration: none; } .unav_day { font-weight: bolder; color: white; background-color: grey; text-align: center; } --> </style> <?php mysql_connect("database.com", "username", "password") or die(mysql_error()); mysql_select_db("database") or die(mysql_error()); $link="#"; $class="gig_day"; # PHP Calendar (version 2.3), written by Keith Devens # http://keithdevens.com/software/php_calendar # see example at http://keithdevens.com/weblog # License: http://keithdevens.com/software/license function generate_calendar($year, $month, $days = array(), $day_name_length = 3, $month_href = NULL, $first_day = 0, $pn = array()){ $first_of_month = gmmktime(0,0,0,$month,1,$year); #remember that mktime will automatically correct if invalid dates are entered # for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998 # this provides a built in "rounding" feature to generate_calendar() $day_names = array(); #generate all the day names according to the current locale for($n=0,$t=(3+$first_day)*86400; $n<7; $n++,$t+=86400) #January 4, 1970 was a Sunday $day_names[$n] = ucfirst(gmstrftime('%A',$t)); #%A means full textual day name list($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month)); $weekday = ($weekday + 7 - $first_day) % 7; #adjust for $first_day $title = htmlentities(ucfirst($month_name)).' '.$year; #note that some locales don't capitalize month and day names #Begin calendar. Uses a real <caption>. See http://diveintomark.org/archives/2002/07/03 @list($p, $pl) = each($pn); @list($n, $nl) = each($pn); #previous and next links, if applicable if($p) $p = '<span class="calendar-prev">'.($pl ? '<a href="'.htmlspecialchars($pl).'">'.$p.'</a>' : $p).'</span> '; if($n) $n = ' <span class="calendar-next">'.($nl ? '<a href="'.htmlspecialchars($nl).'">'.$n.'</a>' : $n).'</span>'; $calendar = '<table class="calendar">'."\n". '<caption class="calendar-month">'.$p.($month_href ? '<a href="'.htmlspecialchars($month_href).'">'.$title.'</a>' : $title).$n."</caption>\n<tr>"; if($day_name_length){ #if the day names should be shown ($day_name_length > 0) #if day_name_length is >3, the full name of the day will be printed foreach($day_names as $d) $calendar .= '<th abbr="'.htmlentities($d).'">'.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'</th>'; $calendar .= "</tr>\n<tr>"; } if($weekday > 0) $calendar .= '<td colspan="'.$weekday.'"> </td>'; #initial 'empty' days for($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){ if($weekday == 7){ $weekday = 0; #start a new week $calendar .= "</tr>\n<tr>"; } if(isset($days[$day]) and is_array($days[$day])){ @list($link, $classes, $content) = $days[$day]; if(is_null($content)) $content = $day; $calendar .= '<td'.($classes ? ' class="'.htmlspecialchars($classes).'">' : '>'). ($link ? '<a href="'.htmlspecialchars($link).'">'.$content.'</a>' : $content).'</td>'; } else $calendar .= "<td>$day</td>"; } if($weekday != 7) $calendar .= '<td colspan="'.(7-$weekday).'"> </td>'; #remaining "empty" days return $calendar."</tr>\n</table>\n"; } $time = time(); $today = date('j',$time); //echo generate_calendar(date('Y', $time), date('n', $time), $days, 3, '/guard_admin.php'); ?> <table style="margin: auto; border: 1"> <tr> <?php $time = time(); for($month=1; $month<=12; $month++){ ?> <td style="vertical-align: top";> <?php $result = mysql_query("select gl_venue, day(gl_date) as gig_date, case when gl_unavailable = '1' then 'unav_day' else 'gig_day' end as 'gl_color' from tg_gig_list where year(gl_date) = '2010' and month(gl_date) = $month order by gl_date"); $arr = array(); $venue = array(); while($row = mysql_fetch_array($result)){ $arr[$row['gig_date']] = array($link,$row['gl_color']); } echo generate_calendar(date('Y', $time), $month, $arr); ?> </td><td></td> <?php if($month%3 == 0 and $month<12){ ?> </tr><tr> <?php } ?> <?php } unset($arr); ?> </tr> </table> thanks very much for your help Aeroswat, its much appreciated and I've learned a lot!
  12. ahh got it. its a separate query and loop that sits in the existing for loop - right I get it, i'll have a go!! thanks.
  13. no....i'm still pulling my hair out lol. I've tried several things, but not got anywhere!! here's the code i've got so far: - <style type="text/css"> <!-- .gig_day { font-weight: bolder; color: white; background-color: red; text-align: center; } .unav_day { font-weight: bolder; color: white; background-color: grey; text-align: center; } --> </style> <?php mysql_connect("database.com", "user", "password") or die(mysql_error()); mysql_select_db("the_guards_org_uk_users") or die(mysql_error()); $query = " select month(gl_date) as 'gig_month', day(gl_date) as 'gig_date', case when gl_unavailable = '1' then 'unav_day' else 'gig_day' end as 'gl_color' from tg_gig_list where year(gl_date) = '2010' order by gl_date"; $result = mysql_query($query); //$link="#"; $class="gig_day"; while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $days[$row['gig_date']] = array($link,$row['gl_color']); } # PHP Calendar (version 2.3), written by Keith Devens # http://keithdevens.com/software/php_calendar # see example at http://keithdevens.com/weblog # License: http://keithdevens.com/software/license function generate_calendar($year, $month, $days = array(), $day_name_length = 3, $month_href = NULL, $first_day = 0, $pn = array()){ $first_of_month = gmmktime(0,0,0,$month,1,$year); #remember that mktime will automatically correct if invalid dates are entered # for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998 # this provides a built in "rounding" feature to generate_calendar() $day_names = array(); #generate all the day names according to the current locale for($n=0,$t=(3+$first_day)*86400; $n<7; $n++,$t+=86400) #January 4, 1970 was a Sunday $day_names[$n] = ucfirst(gmstrftime('%A',$t)); #%A means full textual day name list($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month)); $weekday = ($weekday + 7 - $first_day) % 7; #adjust for $first_day $title = htmlentities(ucfirst($month_name)).' '.$year; #note that some locales don't capitalize month and day names #Begin calendar. Uses a real <caption>. See http://diveintomark.org/archives/2002/07/03 @list($p, $pl) = each($pn); @list($n, $nl) = each($pn); #previous and next links, if applicable if($p) $p = '<span class="calendar-prev">'.($pl ? '<a href="'.htmlspecialchars($pl).'">'.$p.'</a>' : $p).'</span> '; if($n) $n = ' <span class="calendar-next">'.($nl ? '<a href="'.htmlspecialchars($nl).'">'.$n.'</a>' : $n).'</span>'; $calendar = '<table class="calendar">'."\n". '<caption class="calendar-month">'.$p.($month_href ? '<a href="'.htmlspecialchars($month_href).'">'.$title.'</a>' : $title).$n."</caption>\n<tr>"; if($day_name_length){ #if the day names should be shown ($day_name_length > 0) #if day_name_length is >3, the full name of the day will be printed foreach($day_names as $d) $calendar .= '<th abbr="'.htmlentities($d).'">'.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'</th>'; $calendar .= "</tr>\n<tr>"; } if($weekday > 0) $calendar .= '<td colspan="'.$weekday.'"> </td>'; #initial 'empty' days for($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){ if($weekday == 7){ $weekday = 0; #start a new week $calendar .= "</tr>\n<tr>"; } if(isset($days[$day]) and is_array($days[$day])){ @list($link, $classes, $content) = $days[$day]; if(is_null($content)) $content = $day; $calendar .= '<td'.($classes ? ' class="'.htmlspecialchars($classes).'">' : '>'). ($link ? '<a href="'.htmlspecialchars($link).'">'.$content.'</a>' : $content).'</td>'; } else $calendar .= "<td>$day</td>"; } if($weekday != 7) $calendar .= '<td colspan="'.(7-$weekday).'"> </td>'; #remaining "empty" days return $calendar."</tr>\n</table>\n"; } $time = time(); $today = date('j',$time); //echo generate_calendar(date('Y', $time), date('n', $time), $days, 3, '/guard_admin.php'); ?> <table style="margin: auto; border: 1"> <tr> <?php $time = time(); for($month=1; $month<=12; $month++){ ?> <td style="vertical-align: top";> <?php echo generate_calendar(date('Y', $time), $month, $days); ?> </td><td></td> <?php if($month%3 == 0 and $month<12){ ?> </tr><tr> <?php } ?> <?php } ?> </tr> </table> As you can see, I've got the month coming out of the query (as gig_month), i've tried to put the month into an array with the day and the other elements that are required - which I can do, but i'm totally stumped as to how to get the dates from a certain month to echo into the generate_calendar class for every cycle of the $month loop. do i need to do a foreach loop within the $month foreach loop?
  14. excellent, i'll give your suggestions a go later. ...so it should be able to show 12 months from the current month - cool. thanks!
  15. as the calendar script is originally for generating one month the date is simply a number that goes into the third element of the generate_calendar function - so: generate_calendar('2010','4', '21' will return a calendar for April 2010 with the number '21' highlighted. to get the date number i'm taking the date from my database date field like this: day(gl_date) as 'gig_date' and then $days puts that into an array.
  16. OK, i'm pulling my hair out again!! this is what i've got :- The query now has 'month(gl_date) as gl_month' as well as day(gl_date) as gig_date' The $days array looks like this: - while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $days[$row['gl_month']] = array($row['gig_date'],$link,$row['gl_color']); } I'm not sure that that's correct(?). and the loop now looks like this: - <table style="margin: auto; border: 1"> <tr> <?php $time = time(); for($month=1; $month<=12; $month++){ ?> <td style="vertical-align: top";> <?php foreach($days['gl_month'] as $d) echo generate_calendar(date('Y', $time), $month, $d);?> </td><td></td> <?php if($month%3 == 0 and $month<12){ ?> </tr><tr> <?php } ?> <?php } ?> </tr> </table> ..and I know that doesn't work!! Thinking it through, i'm not sure i'm getting the methodology right:- for(every month between 1 and 12){ foreach(month that has dates as $d) generate_calendar(this year, every month, $d) But $d is just going to be the month isn't it - so, the '$d' part of the generate_function shoudl be ($days where $row['gl_month'] = $d) - does that sound right, if so how do I code that?
  17. ok, one more question if i may. I'm now scratching my head over this; As It was I had a calendar showing one month which highlighted dates from a DB that was filtered to a particular month, so the query was: - select day(gl_date) as 'gl_date' from giglist where month(gl_date) = '4' and year(gl_date) = '2010' obviously this worked for April. Now that the code generates a whole year, what do I need to do to change the $days array (and or the loop) so that actual dates are shown in the correct month?? If I remove the 'where' clause from the query, the calendar shows all the dates in every month because it just returns a number. http://www.the-guards.org.uk/private/calendar.php So if it returns '2' the 2nd of every month is highlighted. Do I need to add the month in the $days array and then get the for loop to test for the month??
  18. yep, thats what I did - and that works great!
  19. almost - that generates 12 incidents of the current month, which is an excellent starting point! I just have to figure out how to make it loop through each month - I guess I just change the variables in the generate_calendar. thanks!
  20. Oh. Do you not know about classes? I apologize then if this is the case. I'll take that as "go and read about classes" haha.
  21. maybe i'm being dumb, but i'm not sure how to put together the "$weblog->printCalendar()" function, I know he says roughly what the function does, I'm just unsure about how to get it going - or how I would replicate it using regular functions. I'm not asking for a complete solution thatI can copy and paste here, just looking for some advice - or maybe a pointer to some different code.
  22. Hi, following on from a previous post, I've been using a piece of code that I found here: - http://keithdevens.com/software/php_calendar It works great and i've managed to customise it to take dates from a DB and show the dates on the calendar in different colors depending on the type of entry. www.the-guards.org.uk/private/calendar.php I'd really like to get this to display a whole year but I cant figure out what I need to do - the guy that wrote it shows a script containing custom functions to make it work and hints at how the functions work - but I cant figure it out. I have emailed the guy asking for some help, but he hasn't responded. any ideas? or even suggestions for a similar calendar that I can easily use (this follows on from that fact that I found a post on here saying "dont build your own calendar - use somebody else's haha).
  23. excellent!!! I'm almost there, I can get the desired result but only for one date in the list (the last date), I dont think the while loop is looping properly. $link="/weblog/archive/"; $class="linked-day"; while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $days = (array($row['gl_date']=>array($link,$class))); } If I echo out the array using print_r all the dates are there: $link="/weblog/archive/"; $class="linked-day"; while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $days = print_r(array($row['gl_date']=>array($link,$class))); } any ideas?
  24. Hi, I found a really useful calendar script here: http://keithdevens.com/software/php_calendar I'd like to use it as a summary of dates booked in a database list, i've been trying for hours to populate the following nested array dynamically but im not getting anywhere. this is the array: <?php $days = array( 2=>array('/weblog/archive/2004/Jan/02','linked-day'), 3=>array('/weblog/archive/2004/Jan/03','linked-day'), 8=>array('/weblog/archive/2004/Jan/08','linked-day'), 22=>array('/weblog/archive/2004/Jan/22','linked-day'), ); echo generate_calendar(2004, 1, $days, 3, '/weblog/archive/2004/Jan'); ?> the number is the day number, the first key in the nested array is a hyperlink and the second is a CSS class. for the time being i'll keep the link and the css class the same - so they will always have the same value. so far i've created a connection to my server and created a while loop that does $days = $row['db_date'] and I can echo out the day numbers that I'm looking for - I just cannot figure out how to add the nested elements??? any advice would be greatly appreciated.
  25. Hi, I'm having some trouble with this login script, I thought it was ok until I noticed that after an unsucessful login, you are able to access the hidden content anyway!! For some reason the code is setting a cookie despite an unsuccessful login and should only set a cookie if the username is found in the DB. Also, for some reason, the password field is coming from the form and not the encrypted version. <?php $setcookie_username = setcookie(guard_member, $_POST['username'], $hour); $setcookie_pass = setcookie(guard_member_key, $_POST['pass'], $hour); // Connects to your Database mysql_connect("database.com", "user", "password") or die(mysql_error()); mysql_select_db("db") or die(mysql_error()); //Checks if there is a login cookie if(isset($_COOKIE['guard_member'])) //if there is one, it logs you in and directes you to the members page { $username = $_COOKIE['guard_member']; $pass = $_COOKIE['guard_member_key']; $check = mysql_query("SELECT * FROM users WHERE is_guard = '1' and username = '$username'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) { if ($pass != $info['password']) { } else { header("Location: guard_admin.php"); } } } //if the login form is submitted if (isset($_POST['submit'])) { // if form has been submitted // makes sure they filled it in if(!$_POST['username'] | !$_POST['pass']) { die('You did not fill in a required field.'); } // checks it against the database if (!get_magic_quotes_gpc()) { $_POST['email'] = addslashes($_POST['email']); } $check = mysql_query("SELECT * FROM users WHERE is_guard = '1' and username = '".$_POST['username']."'")or die(mysql_error()); //Gives error if user dosen't exist $check2 = mysql_num_rows($check); if ($check2 == 0) { die('ooooooo sorry my friend, you\'re just not special enough to go there Click <a href="http://www.the-guards.org.uk">Here</a> to get back to where you belong. <br> ...You could try registering <a href="http://www.the-guards.org.uk/private/reg.php">here</a>, but even then I doubt you\'ll be given access to the private/secret/special admin area - only actual Guards alowd in y\'see, sorry about that. <br> Well anyway, its been nice talking to you - it gets a bit lonely here, guarding the Guards admin area, they dont even pay me y\'know and they make me listen to their music all day, god its depressing.'); } while($info = mysql_fetch_array( $check )) { $_POST['pass'] = stripslashes($_POST['pass']); $info['password'] = stripslashes($info['password']); $_POST['pass'] = md5($_POST['pass']); //gives error if the password is wrong if ($_POST['pass'] != $info['password']) { die('Incorrect password, please try again.'); } else { // if login is ok then we add a cookie $_POST['username'] = stripslashes($_POST['username']); $hour = time() + 2592000; $setcookie_username; $setcookie_pass; //then redirect them to the members area header("Location: guard_admin.php"); } } } else { // if they are not logged in ?> <head> </head> <body> </body> </html> I'm beginning to think I should start again haha.
×
×
  • 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.