Jump to content

Jocka

Members
  • Posts

    344
  • Joined

  • Last visited

About Jocka

  • Birthday 10/14/1985

Contact Methods

  • AIM
    xXJockaXx
  • MSN
    jokka85@msn.com
  • Yahoo
    todayz_2morrow

Profile Information

  • Gender
    Male
  • Location
    Dallas, Texas

Jocka's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. I'm assuming this page is called "form1.php" if you're planning to show this information on the same page. If that is the case, try below: <!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" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title>Clasen - Simple HTML Form1</title> </head> <body> <form action="/Chapter2/form1.php" method="post"> <fieldset><legend>Enter a number below:</legend> <p><b>Number:</b> <input type="text" name="inputNum" size="10" maxlength="10" /></p> </fieldset> <div><input type="submit" name="submit" value="Submit" /> </form> <?php if(isset($_POST['inputNum'])){ $number = $_POST['inputNum']; if($number < 10){ echo "The number is smaller than 10"; } else if($number < 10 && $number is > 100){ echo "The number is between 10 and 100"; } else if($number > 100){ echo "The number is larger than 100"; } } ?> </body> </html> Otherwise i suppose if form1.php is on another page, just use the same info I added, on the page.
  2. from what I see all you need to do is either pass the random number through the form (probably a bad idea for security reasons it would basically be pointless) or you could save it in a session. Then before the QUERYS do a check to see if the form was submitted and if the number exists in the session, then compare against that. I can tell I'm not seeing all of your code so I'm assuming this is your issue.
  3. $number = '1'; // THIS BEING YOUR NUMBER, I'M JUST MAKING ONE UP if($number < 10){ echo "The number is smaller than 10"; } else if($number < 10 && $number is > 100){ echo "The number is between 10 and 100"; } else if($number > 100){ echo "The number is larger than 100"; }
  4. Well is the header page that is included, a php file? If so just do something like <title><? echo $title; ?></title> then before including it just set the title: $title = "SITENAME - Pagename"; etc, u get the point.
  5. let's assume the table is called "bar_table" (you didn't say) This should do it: $query = mysql_query("SELECT ". $_GET['day'] . " FROM bar_table WHERE id='".$_GET['id']."'"); Seems to be what your looking for. of course I'd be more secure with the query but thats the basic idea.
  6. if($mail){ header("Location: thank_you.php?action=feedback"); exit(); } A: Once u navigate away i would assume the foreach loop stops B: Exit ends the foreach loop
  7. If there is more than one name submitted, then I want it to check against name1 AND name2 Yea, if more than one name is given, i want to compare against both names.
  8. If there is more than one name submitted, then I want it to check against name1 AND name2 .. what I've decided to do for now is to just throw that extra soundex_code at the end of my "names" table. I just add the code like S500 or N329 or whatever together "S500N329". Now I compare for an absolute match first, then follow that with a search on the soundex codes with this: "soundex_code LIKE '%$name1%' && soundex_code LIKE '%$name2%' . This way i can at least get similar outputs.
  9. just to get the idea if i didn't explain it right. the table is like this: name_soundex ----------------------------- name_id - soundex_id - soundex_code 1 1 N500 1 2 N500 so when I search I would join the name_id's that are similiar so that I can somehow just search as one row and be able to find "name1" and "name2" for a better result
  10. Ok I have a table that holds the soundex codes for names. the table has name_id, soundex_id, soundex_code the name id has the name id of course, soundex id holds any additional parts of the name (middle, last, whatever). what I'm trying to do is find BOTH soundex codes if possible. Of course this doesn't work: SELECT name_id FROM name_soundex WHERE soundex_code = SOUNDEX('name1') && soundex_code = SOUNDEX('name2') Because these have 2 seperate soundex_id's. So what I need to do is maybe join anything with the same name_id ??? Sorry I'm terrible with mysql. Plz help.
  11. i'd use file_get_contents ( http://php.net/manual/en/ref.filesystem ) to get the info CRON JOB to run it every so often. Google both, it's a lot to explain so I won't go thru it all.
  12. I assume something like $query = mysql_query("SELECT * FROM table WHERE level_access != '1'"); ????
  13. ::EDIT:: forget to end the if statement hmm... maybe $info = ''; while ($hunches = mysql_fetch_array($gethunches)) { if($info == ''){ $info .= "<span class=\"red\">" . $hunches['firstname'] . "</span>"; } else { $info .= "<br><span class=\"red\">" . $hunches['firstname'] . "</span>"; // ADDS THE BREAK } } // OUTSIDE OF WHILE STATEMENT $days1[$hunches['day']] = array(NULL,NULL, $info);
  14. hm.. well there are a couple of ways you could do it I believe. // TRY SOME OF THESE STEPS // CHANGE WHILE STATEMENT TO THIS while ($hunches = mysql_fetch_array($gethunches)) { $days1[] = $hunches['day']=>array(NULL,NULL,'<span class="red">' . $hunches['firstname'] . " " . $hunches['lastname'] . "-" . $hunches['dob'] . "--" . $hunches['sex'] . '</span>' ); } // OR ADD NUMBERS YOURSELF? $i = 0; while ($hunches = mysql_fetch_array($gethunches)) { $days1[$i] = $hunches['day']=>array(NULL,NULL,'<span class="red">' . $hunches['firstname'] . " " . $hunches['lastname'] . "-" . $hunches['dob'] . "--" . $hunches['sex'] . '</span>' ); $i++; }
×
×
  • 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.