Jump to content

whittierpc

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

whittierpc's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. how would I get a value to be set in an array inside a while loop and when it looped the second and third time thos values would be the second and third values of the array? Many Thank!
  2. I have a simply shopping cart that has product prices and option prices, both stored in different tables in the same database (MySQL) and when you are putting item in your cart everything it ok, but I am trying to get the total option price, (sum of all option prices for all items that have option with prices) to assign to one variable, and I know this must be simple, but because I place my code within the loop and echo the variable the first time or second time around it has the right value but because it keeps looping the third time around it get reassigned a different value? I hope I have done a good job of explaining this. Sorry for any confusion. Thanks in Advance!
  3. but the problem is only when you try to populate the cart.php, checkout is fine.
  4. sorry I wasn't sure, I will get it posted ASAP
  5. I am at work, I have it at home, but did go to another menu section and then click on the 1 Item in Shopping Cart Button to see the contents of the cart? even though they did not show up in the previous step?
  6. It doesn't output now that its on a IIS 6 but on Linux it was fine, but thats not completely true because if you follow the directions youll see it does output. Its hard to describe
  7. I primarily used the shopping cart code from the book,"Creating Interactive Websites Using PHP...."
  8. Hello, I originally started my site development on a Linux Server with PHP 4 and MYsql 3.23 and recently switch to a Windows Server 2003 with IIS 6 with PHP 4.XX and MySQL 5. I have had some problems along the way but this one I cannot figure out. I read "Creating Interactive Websites Using PHP....." to get started, What really gets me is that if you populate the shopping cart and go through the expected steps it seems that the cart.php page does not work, but if you go to a different menu sections and see the items (# of) in our cart and click on the page you see your stuff. Best to see for yourself. To see what I am talking about follow these steps: 1. Choose a category 2. Pick and item and click View Item 3. Select your optios 4. Click the Add button 5. You will see a blank page 6. Click a different menu section 7. Click the 1 Item in Shopping Cart button
  9. I FOUND IT! I got the bright idea to check the source of my webpage and saw a </br> tag before my <html> tag and wondered how that got there, so I checked the common.php file after having check everything else and sure enough it was there! Thanks for all your help.
  10. [!--quoteo(post=387692:date=Jun 25 2006, 01:44 AM:name=Benj RooZ)--][div class=\'quotetop\']QUOTE(Benj RooZ @ Jun 25 2006, 01:44 AM) [snapback]387692[/snapback][/div][div class=\'quotemain\'][!--quotec--] There might be something in the common.php or clsMetaContent.php that's adding the extra space, because I don't see anything that could cause extra space, whats in those file by the way? [/quote] I have the list of most commonly used files like the connection to the database and classes for Shopping Cart and Email, what really gets me is that on the Linux Server I did not have these problems, it really makes me scratch me head
  11. Here is the actual code <?php include $_SERVER['DOCUMENT_ROOT'].'common.php'; function myheader($ptitle){ //include $_SERVER['DOCUMENT_ROOT'].'classes/clsMetaContent.php'; $meta = &new Meta; $meta->company_name = ""; $meta->description = ""; $meta->keywords2 = ""; $meta->sitename = ""; $meta->slogan = ""; $meta->generator = ""; $id=$_REQUEST[id]; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title><?php echo $meta->metadata($ptitle); ?></title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><style type="text/css"> <!-- body { margin-top: 0px; } --> </style></head> <body bgcolor="#FFFFFF" leftmargin="0" marginwidth="0"> <table id="Table_01" width="800" height="648" border="0" cellpadding="0" cellspacing="0"> <tr> <td rowspan="2"> <img src="images/home_01.gif" width="1" height="277" alt=""></td> <td> <a href="http://www.roaring.com"><img src="images/home_02.gif" alt="" width="118" height="28" border="0"></a></td> <td> <a href="/home.php?id=<?=$id?>"><img src="images/homeblue.gif" alt="" width="75" height="27" border="0"></a></td> <td> <a href="/contactus.php?id=<?=$id?>"><img src="images/home_04.gif" alt="" width="100" height="28" border="0"></a></td> <td> <a href="/help.php?id=<?=$id?>"><img src="images/home_05.gif" width="98" height="28" border="0" alt=""></a></td> <td> <a href="/hd.php?id=<?=$id?>&cat=app"><img src="images/home_06.gif" alt="" width="78" height="28" border="0"></a></td> <td> <a href="/about.php?id=<?=$id?>"><img src="images/home_07.gif" alt="" width="100" height="28" border="0"></a></td> <td> <a href="/private.php?id=<?=$id?>"><img src="images/home_08.gif" width="121" height="28" alt="" border="0"></a></td> <td> <a href="/pc.php?id=<?=$id?>"><img src="images/home_09.gif" width="109" height="28" alt="" border="0"></a></td> </tr> <tr> <td colspan="8"> <img src="images/burbank_home_10.gif" width="799" height="249" alt=""></td> </tr> <tr> <td colspan="9"> <img src="images/home_11.gif" width="800" height="371" alt=""></td> </tr> </table> <!-- End ImageReady Slices --> <div id="Login Form" style="position:absolute; left:659px; top:295px; width:139px; height:96px; z-index:13"> <form action="/login.php" method="post"> <table width="139" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <input name="username" type="text" id="username" value="<?=$_POST['username'];?>" size="18"></td> </tr> <tr> <td height="3"></td> </tr> <tr> <td><input type="hidden" name="req" value="validate"></td> </tr> <tr> <td><input name="password" type="password" id="password" size="18"></td> </tr> <tr> <td> <input type="image" src="images/okbutton.gif" value="submit"></td> </tr> </table> </form> </div> </body> </html> <?php } function footer(){ ?> <?php } ?>
  12. sorry my actual code was a lot longer so I just pasted the code listed in the book because it was quicker, I have not changed browsers, when I developed I was using Safari on Mac and Firefox on Windows, and I get the same problem now on both browsers. Problem is that I don't know what this problem is called and don't know where to search for a solution?
  13. I actually do not have that line in my code I just have the open <html> tag, but I don't quite get your solution, I should learn XHTML and then change my existing html to xhtml? Just want to make sure I got it right. I added that line in my code were it should go and it didn't help. Thanks
  14. Hello People! I have been using php for about 1 year and I developed a site on a linux server about 1 year ago and then had to move the server because I started using another language, long story short I am on a windows server now and I used Creating Interactive Websites with PHP and Web Services to help me build the site so I utilitized the layout discussed in Chapter 4, well on the Linux Server the site worked beautifully, now on the windows server the site looks ok, problem is that I have this space above the pages that use the layout template. How do I fix this? The code is practically this <?php include $_SERVER['DOCUMENT_ROOT']."/common.php"; function myheader($ptitle){ $meta = &new Meta; $meta->company_name = "My Company"; $meta->description = "This is my first PHP enabled website."; $meta->keywords2 = "PHP, MySQL, Web Development"; $meta->sitename = "My PHP Site"; $meta->slogan = "Be patient, I'm learning!"; $meta->generator = "PHP"; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <?php echo $meta->metadata($ptitle); ?> </head> <body> <table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#000000"> <tr> <td colspan="3"><a href="/"><img src="/images/logo.jpg" ALT="My PHP Site" BORDER="0"></a><hr size="1"></td> </tr> <tr> <td colspan="3"> <?php include $_SERVER['DOCUMENT_ROOT']. '/html/forms/search_form.html'; ?> </td> </tr> <tr> <!-- Left Links Column --> <td width="170" valign="top"> <table width="170" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="10">&nbsp;</td> <td valign="top"> <?php include $_SERVER['DOCUMENT_ROOT']. '/boxes/member_box.php'; include $_SERVER['DOCUMENT_ROOT']. '/boxes/box_admin_links.php'; include $_SERVER['DOCUMENT_ROOT']. '/boxes/box_main_links.php'; include $_SERVER['DOCUMENT_ROOT']. '/boxes/box_books.php'; include $_SERVER['DOCUMENT_ROOT']. '/boxes/box_translate.php'; include $_SERVER['DOCUMENT_ROOT']. '/boxes/box_quick_stats.php'; ?> </td> <!-- End Left Links Column --> <td width="10">&nbsp;</td> </tr> </table> </td> <td valign="top"> <!-- End Header and Begin Content --> <?php } function footer(){ ?> <!-- End Content and Begin Footer --> </td> <!-- Right Column Boxes and Links --> <td width="130" valign="top"> <?php include $_SERVER['DOCUMENT_ROOT']. '/boxes/box_shopping_cart.php'; ?> </td> <!-- End Right Column Boxes and Links --> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td width="130" nowrap>&nbsp;&nbsp;&nbsp;</td> </tr> </table> </body> </html> <?php } ?>
×
×
  • 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.