Jump to content


Photo

script error


  • Please log in to reply
No replies to this topic

#1 baber_abbasi

baber_abbasi
  • Members
  • PipPipPip
  • Advanced Member
  • 33 posts
  • LocationPakistan

Posted 12 March 2003 - 05:51 PM

Hi,

I am having problem in displaying values on next page after uploading the whole site on net. As far as my own PC is concerned, these values are displayed properly.


I am sending hereunder the code whic I am using. Pl take time and help me solve the problem.

Thanks a lot.


===============================================
Database file; \"db.php\"
==============================================

<?
/* Database Information - Required!! */
/* -- Configure the Variables Below --*/
$dbhost = \'localhost\';
$dbusername = \'root\';
$dbpasswd = \'\';
$database_name = \'test\';

/* Database Stuff, do not modify below this line */

$connection = mysql_pconnect(\"$dbhost\",\"$dbusername\",\"$dbpasswd\")
or die (\"Couldn\'t connect to server.\");

$db = mysql_select_db(\"$database_name\", $connection)
or die(\"Couldn\'t select database.\");
?>

==============================================
file coding is under;
==============================================


<?php
include \'db.php\';
$query = mysql_query(\"select * from customers\"); // search new record
$num = mysql_num_rows($query);
$query1 = mysql_query(\"select * from customers where custid=$num\"); // search new record
if (mysql_num_rows($query) > 0) { // if Records found
$row = mysql_fetch_array($query1);
?>
<?php //if ($totalRows_Recordset2 >=1) { ?>
<table width=\"100%\" cellpadding=\"2\">
<tr>
<td><font color=\"#FF3300\" size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong>

Biling Information</strong></font></td>
</tr></table><table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\">
<tr bgcolor=\"#CCCCCC\">

<td><strong><font color=\"#FFFFFF\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Billing
Address:</font></strong></td>
<td width=\"50%\"><strong><font color=\"#FFFFFF\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Shipping
Address:</font></strong></td>
</tr>
<tr>
<td width=\"50%\" height=\"97\" bordercolor=\"#FFFFFF\" bgcolor=\"#FFFFFF\">
<p><font size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong> <?php echo \"<b> \" . $row[\"org\"].\"</b>\"; ?>
</strong><br>
<strong><?php echo \"<b> \" . $row[\"lastn\"].\"</b>\"; ?>, <?php echo \"<b> \" . $row[\"firstn\"].\"</b>\"; ?></strong><br>
<?php echo \"<b> \" . $row[\"address\"].\"</b>\" ?><br>
<?php echo \"<b> \" . $row[\"city\"].\"</b>\" ?>, <?php echo \"<b> \" . $row[\"state\"].\"</b>\"; ?> <?php echo \"<b> \" . $row[\"zip\"].\"</b>\"; ?></font></p>
</td>
<td bgcolor=\"#FFFFFF\"><font size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong><? if ($row_Recordset1[\'shipaddress\'] == \"\") ?><?php echo \"<b> \" . $row[\"shiporg\"].\"</b>\"; ?></strong><br>
<strong><?php echo \"<b> \" . $row[\"shiplastn\"].\"</b>\"; ?>, <?php echo \"<b> \" . $row[\"shipfirstn\"].\"</b>\"; ?></strong><br>
<?php echo \"<b> \" . $row[\"shipaddress\"].\"</b>\"; ?><br>
<?php echo \"<b> \" . $row[\"shipcity\"].\"</b>\"; ?>, <?php echo \"<b> \" . $row[\"shipstate\"].\"</b>\"; ?> <?php echo \"<b> \" . $row[\"shipzip\"].\"</b>\"; ?></font></td>
</tr>
</table></td>

==========================END=============END================
Baber N Abbasi




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users