Jump to content

mickisdaddy

Members
  • Posts

    5
  • Joined

  • Last visited

    Never

About mickisdaddy

  • Birthday 03/31/1971

Contact Methods

  • Website URL
    http://www.sportscardsource.com
  • Yahoo
    mickisdaddy@yahoo.com

Profile Information

  • Gender
    Not Telling
  • Location
    Colorado

mickisdaddy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Can you use a alias in a where clause? :? Sean
  2. Here is the form code <form method=\"post\" action=\"Baseball/players.php\"> <p>Last Name <input type=\"text\" name=\"last\"> <br> First Name <input type=\"text\" name=\"first\"> <br> <input type=\"submit\" name=\"Submit\" value=\"Submit\"> <input type=\"reset\" name=\"Submit2\" value=\"Reset\"> Then it goes to this results page <?php $db = mysql_connect(\"localhost\", \"login\", \"password\"); mysql_select_db(\"database\",$db); $result = mysql_query(\"SELECT player_id, first_name, last_name FROM players WHERE last_name LIKE \'$last%\' AND first_name LIKE \'$first%\'\", $db); echo \"<b>Here are the players that match your entry</b><p>\"; while ($myrow = mysql_fetch_row($result)) { printf(\"<a href=\'Baseball/dbtest.php3?player_id=%s&fname=%s&lname=%s\'>%s %s</a><br>\", $myrow[0], $myrow[1], $myrow[2], $myrow[1], $myrow[2]); } mysql_close($db); ?> I turned the error handling down a little and it got rid of the error, but it still gave me results of all records in the table that I am querying. The same file with no modifications works on my hosts server. It then gives me this problem on the test server on my computer that I am trying to get working. Sean
  3. These are the lines that are not commented out error_reporting = E_ALL; display all errors, warnings and notices display_errors = On display_startup_errors = Off log_errors = Off track_errors = Off I changed the error_reporting to E_ERROR and it gets rid of the errors about the undefined variable, but with the results I still have the same problem. The form searches by first and last name. I enter a last name to search for and the results page gives me all people no matter what name they are. I think it is a problem with processing the variables that are passed from the form. Sean
  4. The code only works fine on my hosts server not on my test server. On my test server I get those messages then it lists all lines from that table of the database. Sean
  5. Hello all I am having a little problem. I am setting up a test server on my computer at home to test my web site before I make it live. I finally got Apache, PHP and mySQL all installed. I have a form that searches my database. When I click search it goes to the results page and says the following: Notice: Undefined variable: last in c:program filesapache groupapachehtdocsscswwwbaseballplayers.php on line 82 Notice: Undefined variable: first in c:program filesapache groupapachehtdocsscswwwbaseballplayers.php on line 82 These are the two variables that are passed from the form. This page works with no problems on my hosts server. I do have phpMyAdmin installed and working perfectly. What am I doing wrong? Is there something more that I have to install? Is there something in the httpd.conf file I have to change? Here is my config OS WinXP Pro Apache 1.3.27 PHP 4.3.0 mySQL 3.23.49 phpMyAdmin 2.2.6 Any help is greatly apreciated. Sean Wilhelm
×
×
  • 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.