Jump to content

pcwood

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

About pcwood

  • Birthday 08/25/1964

Contact Methods

  • AIM
    paulcwood

Profile Information

  • Gender
    Male
  • Location
    Delaware

pcwood's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Good answer.  Thank You.  Ultimatly, I did this: [color=blue][/color] $referrer = getenv("HTTP_REFERER"); if ($referrer == "") { $referrer="http://www.mywackysite.com/"; }
  2. I've considered this but I'd have to have some such identity for EVERY (and there are a lot) web page within the site.  It's not really a feasable solution.  I was hoping there was a php function I was unaware of which could glean the URL of the page the user just came from.  Doesnt the "BACK" function in javascript pull this from the browser?  If so, perhaps PHP can? Thanks for the response. -PCWOOD
  3. Greetings, Is it possible to know, in a php based webpage, how to determine the page from which the user was sent? I want to have a "SIGN IN" link on any page within a site but regardless of where the user signed in, once they have (successfully), I'd like to send them back to the originating page (no layers involved) from where they came (or decided to click on the sign-in link). TIA --- Paul Wood
  4. So shall I assume $result ==0 is the point of failure?  Does this ONLY occur with the WHERE clause?  If so, why? Example Code from php.net looks like this: [color=blue][/color] <?php $result = mysql_query('SELECT * WHERE 1=1'); if (!$result) {    die('Invalid query: ' . mysql_error()); } ?> [color=black][/color] How have I changed the outcome? Thanks for the response. -PCWOOD
  5. Greetings, I'm using a familiar formula to retrieve and check results from a mysql db.  However, I'm stuck on a response I haven't seen before.  Perhaps someone can tell me why I'm getting the response I am.  TIA: [color=blue][/color] <?PHP // if the user hit the submit button and filled the email field then ... if(isset($_POST['submit']) && $email != "") {     // Check db for existence of user   $link = mysql_connect ("localhost", "the_admin", "my_password");   if(!$link) {     echo "Database Connect Error: " . mysql_error() . "<BR>Please contact our company or try back later.";   }   // Select the database   $selectResponse = mysql_select_db ("the_database", $link);   if(!$selectResponse) {     echo "Database Select Error.  Please contact our company or try back later.";   }     // Make the SQL statement call   $query = sprintf("SELECT Cemail, Ccqrt_question, Ccqrt_answer FROM customer_data WHERE Cemail='%s'", mysql_real_escape_string($email));   $result = mysql_query($query, $link);   echo "Query: $query<P>\n";   echo "Result: [$result]<BR>Error:" . mysql_error() . "<P>";     if(!$result) {     echo "Customer [$email] was not found to be on record.  Please check your spelling and try again or "; echo "<A HREF=\"custREG.htm\">create a new account</A>.  Thank you.";   } else {      $row = mysql_fetch_row($result);     $Cemail = $row[0]; $Ccqrt_question = $row[1]; $Ccqrt_answer = $row[2]; echo "Security Question: $Ccqrt_question<P>\n"; echo "<INPUT TYPE=\"text\" SIZE=\"50\" MAXLENGTH=\"50\" NAME=\"answer\"><P>\n"; echo "I cannot remember this either.  Please just reset my password and email it to me.\n";   }    mysql_close($link);   } else {   echo "Enter your username (email address)<BR>\n";   echo "<INPUT TYPE=\"text\" SIZE=\"50\" MAXLENGTH=\"40\" NAME=\"email\"><BR>\n";   echo "<INPUT TYPE=\"reset\" NAME=\"Reset\" VALUE=\"Reset Form\">&nbsp;\n";   echo "<INPUT TYPE=\"submit\" NAME=\"submit\" VALUE=\"submit\">\n"; } ?> [color=black][/color] NOTE: This is, of course, incomplete and I have ECHOs embeded to help me figure what's going on.  Here is what I get when I put either a good or or bad query in: [color=red][/color] Query: SELECT Cemail, Ccqrt_question, Ccqrt_answer FROM customer_data WHERE Cemail='s.austin@megabucks.com' Result: [Resource id #2] Error: [color=black][/color] I've done this many times before without fail.  Can anyone see the problem?
×
×
  • 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.