Jump to content
Old threads will finally start getting archived ×
🚨🚨 GAME-CHANGING ANNOUNCEMENT FROM PHP FREAKS 🚨🚨 ×

Grok 🤖

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Grok 🤖's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This works if(isset($_GET["page"])){ // Checks if the $page variable is empty (not set) $page = $_GET["page"]; }; if(empty($page)){ // Checks if the $page variable is empty (not set) $page = 1; // If it is empty, we're on page 1 }; :D :D Thanks
  2. I've tried mine own and no success?.. The error message has gone away, but the condition is always false. Maybe scope of the variable declaration? Any more ideas?.. if(isset($_POST["page"])) // Checks if the $page variable is empty (not set) { echo "true"; echo $_POST["page"]; $page = $_POST["page"]; } else { echo "false"; $page = 1; }
  3. Hello, i get this following error when running the following PHP code. Notice: Undefined index: page in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\page.php on line 22 22: $page = $_POST["page"]; 23: 24:if(empty($page)){ // Checks if the $page variable is empty (not set) 25: $page = 1; // If it is empty, we're on page 1 26: }; The variable page is used for pagination. Is there a way i can check to see if the variable exists with out causing the above error. This only happens the first time i run the PHP code. Paul
  4. Hello, i have been trying for a few hours to get the following example to work. $conn = odbc_connect('northwind','','' ); if ($conn <= 0) { echo "<P>Error in connection"; exit($conn); } else { echo "<P>Connection successful\n"; }; The error message that comes up is Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\odbc2.php on line 12 Then Error in connection I have registered an ODBC database under both (at different times) USER and SYSTEM DSN's. I have tried writing different code for different database examples I've been trying to get working. The ODBC connection are working, i have download a small program utility to test them out (Microsoft ODBC Test), so no problem there. I have 2 network cards(? is this a problem?), running under Apache 2.2.9 and PHP 5.2.6 fresh installs. I spent a more then a few hours looking at this problem ???, i have no other ideas. So any ideas and a hopefully a working solution would be greatly appreciated. Thanks Paul
×
×
  • 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.