Jump to content

script error


baber_abbasi

Recommended Posts

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================

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.