Results 1 to 4 of 4

Thread: Test site works fine production site doesn't

  1. #1
    Join Date
    Dec 2003
    Posts
    31

    Default Test site works fine production site doesn't

    I have worked on a test site for a month with no trouble, but when I try to run it on production site it gives me this error.
    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/fsbohot/public_html/FSBO/subscribe.php on line 8

    Warning: mysql_data_seek(): supplied argument is not a valid MySQL result resource in /home/fsbohot/public_html/FSBO/subscribe.php on line 18
    Test site at http://www.800fsbohotline.com/listin...hp?listingID=7

    Production site is http://www.888fsbohotline.com/FSBO/l...hp?listingID=7

    PHP Code:
    <?php
    require_once("include/common.php");
    $dbh1 mysql_connect($db_server$db_user$db_password)
    or die(
    "Unable to connect to MySQL");
    $selected mysql_select_db("$db_database",$dbh1)
    or die(
    "Could not select $db_database");
    $result mysql_query("SELECT `ID` , `Title` FROM `fsbo_listingsDB` where `ID` = $listingID");
    while (
    $row mysql_fetch_array($result,MYSQL_ASSOC)) $mytitle $row{'Title'};{
    }
    $text =trim($mytitle"Eext. ");
    // trim the ASCII control characters at the beginning and end of $binary
    // (from 0 to 31 inclusive)
    $clean trim($binary"\x00..\x1F");
    mysql_close($dbh1);
    mysql_data_seek($result0);
    ?>
    <?
     
     
    $dbh 
    mysql_connect($db2_server$db2_user$db2_password)
    or die(
    "Unable to connect to MySQL");
    $selected mysql_select_db("$db2_database",$dbh)
    or die(
    "Could not select $db2_database");
    $result mysql_query("SELECT `pk_account` FROM `swd_account` Where `name` = \"$text\"");
    while (
    $row mysql_fetch_array($result,MYSQL_ASSOC)) $myaccount $row{'pk_account'}; {
    }
    mysql_close($dbh);
    ?>
    <? 
    echo"<center>Subscribe to this sellers information list. <br>Email will <u>only</u> be sent concerning this property.<br><font color=\"red\">*</font> Indicates Required Fields.</center><br><form name=\"mailform\" method=\"post\" action=\"http://www.888fsbohotline.com/cgi-bin/mail/register.cgi\">"
    " <table width=\"80%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">"
    " <tr>"
    "    <td align=\"right\" width=\"50%\"><b>Name:</b></td>"
    "    <td width=\"50%\">"
    "     <input type=\"text\" name=\"name\" size=\"25\" maxlength=\"40\">"
    "     <font color=\"red\">*</font>"
    "     <input type=\"hidden\" name=\"account\" value=\""; echo $myaccount; echo"\">"
    " </td>"
    " </tr>"
    " <tr>"
    "    <td align=\"right\" width=\"50%\"><b>Email:</b></td>"
    "    <td width=\"50%\">"
    "     <input type=\"text\" name=\"email\" size=\"25\" maxlength=\"40\">"
    "     <font color=\"red\">*</font>"
    "    </td>"
    " </tr>"
    " <tr>"
    " <td align=\"right\" width=\"50%\"><b>Address:</b></td>"
    " <td width=\"50%\">"
    "     <input type=\"text\" name=\"dp33\" size=\"25\" maxlength=\"40\">"
    ""
    " </td>"
    " </tr>"
    " <tr>"
    " <td align=\"right\" width=\"50%\"><b>City:</b></td>"
    " <td width=\"50%\">"
    "     <input type=\"text\" name=\"dp32\" size=\"25\" maxlength=\"40\">"
    ""
    " </td>"
    " </tr>"
    " <tr>"
    " <td align=\"right\" width=\"50%\"><b>State:</b></td>"
    " <td width=\"50%\">"
    "     <input type=\"text\" name=\"dp34\" size=\"25\" maxlength=\"40\">"
    ""
    " </td>"
    " </tr>"
    " <tr>"
    " <td align=\"right\" width=\"50%\"><b>Zip:</b></td>"
    " <td width=\"50%\">"
    "     <input type=\"text\" name=\"dp35\" size=\"25\" maxlength=\"40\">"
    ""
    " </td>"
    " </tr>"
    " <tr>"
    " <td align=\"center\" colspan=\"2\"> <input type=\"submit\" value=\"Subscribe\"></td>"
    " </tr>"
    " </table>"
    "             </form>";
    ?>
    Any help would be greatly appreciated.

    Craig

  2. #2
    Join Date
    Sep 2004
    Location
    Jackson, MS
    Posts
    447

    Default

    Not a PHP expert, but it looks like you are trying to connect two times from this page, plus you have the include common.php. Did you make this page in Dreamweaver?

  3. #3
    Join Date
    Dec 2003
    Posts
    31

    Default

    jntcomputers,
    Thanks for your reply.
    looks like you are trying to connect two times from this page
    Yes, I am connecting to two separate databases.

    Sorry for the ugly code but I am a NON expert also

    Did you make this page in Dreamweaver?
    No, I edit (hack, hen peck, cut & paste, ....) in Crimson Editor

    The point that I need help on is that the test site works flawlessly (creating the subscribe form for the particular property.) but the production site is not working. The above code is the only thing that I have added to the default "listingview.php" I called it subscribe.php.

    I don't know what else to provide.

    Craig
    Last edited by acme; 11-09-2004 at 01:28 PM.

  4. #4
    Join Date
    Sep 2004
    Location
    Jackson, MS
    Posts
    447

    Default

    The pages are not identical, one has the header and menu and one is in a subfolder. Don't know if this is the problem or not. Try codewalkers.com they have alot of PHP guys that will help you out.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •