Jump to content

neiltaylormade

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

neiltaylormade's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you so much, and for such a quick reply too. I think I'm trying to be too clever for my own good, used to use dreamweaver to do it all for me, i.e. recordsets, but trying to teach myself a better way of doing things! Thanks again
  2. I dont understand whats going wrong on this script, using this script displays the orderID on the page, but as soon as I try to include any other elements from the table they dont show, and I cant work out why. <? // You may copy this PHP section to the top of file which needs to access after login. session_start(); // Use session variable on this page. This function must put on the top of page. if(!session_is_registered("userLogin")){ // if session variable "username" does not exist. header("location:../index.php"); // Re-direct to index.php } ?><?php require_once('../connections/conn.php'); ?> <?php mysql_select_db($database_conn, $conn); $query=("SELECT o.orderID orderID, c.clientTitle Title, c.clientForename Forename, c.clientSurname Surname, c.clientPhone Phone, c.clientEmail Email, ba.address1 BillingAddress1, ba.address2 BillingAddress2, ba.addressCity BillingCity, ba.addressPostcode BillingPostcode, bc.countryName BillingCountry, da.address1 DeliveryAddress1, da.address2 DeliveryAddress2, da.addressCity DeliveryCity, da.addressPostcode DeliveryPostcode, dc.countryName DeliveryCountry, op.productName ProductName, op.productQuantity ProductQuantity, op.productPrice ProductPrice, op.productSubtotal ProductSubtotal, o.orderTotal OrderTotal, op.imageID ImageID, op.imageThumb ImageThumb, o.userLogin userLogin FROM cmsOrders o LEFT JOIN cmsClients c ON c.clientID = o.orderClient LEFT JOIN cmsAddresses ba ON ba.addressID = o.orderBilling LEFT JOIN cmsAddresses da ON da.addressID = o.orderDelivery LEFT JOIN cmsCountries bc ON bc.countryValue = ba.addressCountry LEFT JOIN cmsCountries dc ON dc.countryValue = da.addressCountry LEFT JOIN cmsOrderProducts op ON op.orderID = o.orderID WHERE o.orderID = '" . addslashes($_GET['orderID']) . "' AND o.userLogin = '" . ($_SESSION['userLogin']) . "'"); $result=mysql_query($query); $num=mysql_numrows($result); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Admin - Shop - Order <?php echo $orderID; ?></title> <link href="../functions/site.css" rel="stylesheet" type="text/css" /> </head> <body> <h1><a href="../home.php">Website Management</a> > <a href="index.php">Shop</a> > <a href="orders.php">Orders</a> > Order <?php echo $orderID; ?></h1> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td width="50%" bordercolor="#666699"><table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td>Client Name: </td> <td><?php echo $Title; ?> <?php echo $Forename; ?> <?php echo $Surname; ?></td> <td> </td> </tr> <tr> <td> </td> <td colspan="2"> </td> </tr> <tr> <td> </td> <td colspan="2"> </td> </tr> <tr> <td> </td> <td colspan="2"> </td> </tr> </table></td> <td width="50%" rowspan="2" bordercolor="#666699"> </td> </tr> <tr> <td bordercolor="#666699"> </td> </tr> </table> <p> </p> <p><a href="../index.php">Logout</a></p> </body> </html> If I insert the SQL statement into my sql viewer, it brings up the table nicely and with my named table headings, I really dont get why they are not displaying on my page. Any help will be much appreciated. Thanks Neil
  3. Hi All, I know this is a common question but I just cant find the answer that suits me. I have a database with 2 tables, one named galAlbums and the other galImages. Basically all I was to do is have two drop down boxes the 1st with the album names, stored in galAlbums, and the second with the image names stored in galImages. each album has a unique id (albumID) and the select box will uses this as the value, but the label will be the album name (albumName). I then want the next dropdown box to be populated with the images in that album but WITHOUT a page refresh. the images have a unique id (imageID) a name (imageName) and also they are linked to the album in the field imageAlbum, which the number relating to the album in galAlbums. I am assuming the best way of doing this is by using ajax, but I have searched the internet twice over and cant find the answer anywhere. Any help will be appreciated. Thanks Neil
  4. Thanks for your reply, I was trying to do this in one full sweep, but I have now been able to achieve this by deleteing the files on one page load, and then deleting the mysql row on the next. Thanks Neil
  5. Hi, hope someone can help! I have a database with the following colums, imageID, imageName, imageDesc, imageFile, imageHeight, imageWidth, imageThumb, imageThumbHeight, and imageThumb Width. I can easily delete a row from the mysql table, galImages, but I also want to delete two files from a directory. The file names are stored in the columns imageFile and imageThumb. Any help will be appreciated. Neil
×
×
  • 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.