Jump to content

rstewar

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rstewar's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have a javascript image scroller on a page, and it seems that part of the scroller is hidden under the background of the parent div. This is what it looks like with the container background set to white http://dl.dropbox.com/u/228726/bg.jpg and this is what it looks like with no container background http://dl.dropbox.com/u/228726/no_bg.jpg Here is a link to the page that I am having the issue on: http://tppdemo.techcarolina.com/ I am not sure what part of the CSS code is causing the issue so here is a link to the entire file: http://tppdemo.techcarolina.com/wp-content/themes/Tiger%20Paw%20Productions/inc/css/style.css Thanks in advance for any help!
  2. Hi, I have a site that is alcohol related and by law i must have a page where visitors verify if they are of age. I have a very simple code snippet at the top of each page that checks if the visitor is verified. <?php //Start the session session_start(); /* * If they haven't passed the age test * then the age_verified session will not * be set, since it is only set if they * say they are 21 years of age. */ if(!isset($_SESSION['age_verified'])) { header("Location: verify.php"); exit; } ?> Is is possible to allow search engines such as Google, Yahoo, Bing, etc. to access these pages and index them? Maybe by verifying the user agent or something?
  3. Thanks. Works Great.
  4. I am having trouble printing unique values from a database where 3 different fields could contain the same value. Basically, I have 4 fields 'id, university_1, university_2, and university_3'. And I have records like this: ID university_1 university_2 university_3 ------------------------------------------------------------------- 1 Clemson Virginia California ------------------------------------------------------------------- 2 Virginia USC Florida ------------------------------------------------------------------- 3 USC Florida Clemson ------------------------------------------------------------------- I want to print a list of the universities, but I do not want a college to show up more than one time in the list. I only know how to select a distinct value for one field. Here is what I have thus far: $result = mysql_query("SELECT DISTINCT (university_1), university_2, university_3 FROM stores WHERE status = 1 AND approved = 1"); while($row = mysql_fetch_array($result)) { $u1= stripslashes($row['university_1']); $u2= stripslashes($row['university_2']); $u3= stripslashes($row['university_3']); //display the row if(!empty($u1)) { print '<option>'.$u1.'</option>'; } if(!empty($u2)) { print '<option>'.$u2.'</option>'; } if(!empty($u3)) { print '<option>'.$u3.'</option>'; } } Thanks for any help.
  5. Works great. Thanks for the help.
  6. I am trying to print data from a database into a form. I used the mysql_escape_string() function before the data was inserted so slashes were added before all quotes. The problem is that when I try to print the data and use stripslashes() to remove the slashes the output stops before the single quote ('). It is supposed to output "Billy Ray's.." The code that outputs the text: <input type='text' name='name' id='name' value='<?php echo stripslashes($fields['name']['value']); ?>' /> Image of output What I find odd is that the html source from the webpage shows the full string: <label>Name of Bar: <span class='required'>*</span></label> <input type='text' name='name' id='name' value='Billy Ray's...' /> Does anyone have any idea what is going on?
  7. Works great. Can't believe I didn't think of that. Thanks
  8. Is there a way to select only unique records from a database, where only one value is unique? I want to be able to select unique values for 'university_1', but 'latitude' and 'longitude' do not have to be unique. $sql = "SELECT university_1, latitude, longitude FROM stores "; $sql .= "WHERE state='$state' AND "; $sql .= "latitude BETWEEN '$min_lat' AND '$max_lat' AND longitude BETWEEN '$min_lon' AND '$max_lon' AND approved=1 AND status=1"; Thanks for any help.
  9. Worked like a charm. Thanks so much for the help, I learned a lot.
  10. I am trying to create a age verification page for a website. I am having an issue getting the page to redirect if someone is not of age. verify.php <form method="POST" action="/ageCheck.php"> <input id="enterbutton" type="submit" name="v" value="I'm 21" /> <input id="enterbutton" type="submit" name="v" value="Nope. I sit at the kid's table" /> </form> ageCheck.php <? // start session session_start(); $_SESSION['v'] = $_POST['v']; // Check if verified if($_SESSION['v'] == "I\'m 21") { $_SESSION['check'] = 1; header('Location: index.php'); }else { $_SESSION['check'] = 0; header('Location: http://google.com'); } ?> Everything seems to work fine up to this point. But when I post the following code in each pages header it does not redirect. <? session_start(); if($_SESSION['check'] != 1) { header('Location: verify.php'); print 'not verified'; // print for debugging } ?> The odd thing to me is that it does print "not verified", but it will not redirect. Thanks in advance for any help!
×
×
  • 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.