Jump to content

esoteric

Members
  • Posts

    104
  • Joined

  • Last visited

    Never

Everything posted by esoteric

  1. Hi guys, this sounds very complicated to me but i wold really appreciate any help and warning now, it may be a bit of a long read. Thanks to much help here i have solved most problems but have a new task, upon a form submission i need it too create a new .php page from a template.php page i already have. The name of the new page needs to reflect a few details input into the form. At the moment the page name is in the following format; ref&surname=(customer last name) &on= (order number) &date= (order date) so it may look something like; ''ref&surname=smith&on=123456789&date=01012011.php'' I have a script that is generating this when the customer logs in by typing in there details, that's why it looks so complicated. Can anyone help me get this far? that would be a great start and hopefully i could expand from there
  2. Also you sure seem to know you stuff so maybe you can help me with my next task? I hate keep asking for help without being able to give any myself but this is a great place to solve these problems. Now i have a form emailing the customer and updating the database correctly i need it to somehow create a new .php page from a template page i already have but with some details updated (its a invoice page). Im currently having to create them manually which is a bit of pain to be honest. I can post the whole page if it helps, if you can't help then that's fine, thought it makes sense to ask here before starting a new topic.
  3. Oh i think i understand, so if i had a column in my sql database called 'UserID' and from a form i was getting a variable called 'id' i would use UserID = '{$id}'? Also does the { brackets make a difference? So far i been using quotations and they seem to be working, or is this the wrong way to do it?
  4. Changed it too UPDATE orderTable SET custUsername = '". $custuser ."', custPassword = '". $custpass ."' WHERE orderNum = '". $orderNum ."' Seems to have fixed it. Thanks very much for the speedy help.
  5. Thanks for the quick replies. @mjdamato I tried what you said, it appears to connect ok, well i get no error telling me it can't and the info is being emailed correctly but the table isnt being updated, both fields are still blank. in the script i have the following to get my input data from a form when i press submit $custuser = $_POST['custuser']; $custpass = $_POST['custpass']; then just before it sends the mail i have mysql_connect("xxxxxxx", "$username", "$password") or die( "Unable to connect to database"); mysql_select_db("membership") or die( "Unable to select database"); mysql_query (" UPDATE orderTable SET custUsername = '$custuser', custPassword = '$custpass' WHERE orderNum = '$custOrderNum' "); maybe you can see where im going wrong? @WatsonN sorry but i don't understand what col1 = '{$col1data}', is referencing, im far from skilled at this so excuse me if i sound stupid.
  6. I have an order system that adds all the order details to the database, once i have reviewed the order i email the customer a unique username and password that i generate at random. I want to add this new information to the existing information that is already there in teh table when i send the email but im struggling. I am trying something like mysql_connect("xxxx", "xxxxx", "xxxxx") or die( "Unable to connect to database"); mysql_select_db("orderTable") or die( "Unable to select database"); $query="INSERT INTO orderTable WHERE orderNum = '$custOrderNum'"; but im not sure how to go about adding the new data? I have created two new columns in my database called custUsername and custPassword , im trying to make it check the ordernum i type in the email against the tables existing data, and where it matches add the two new fields of data which is the username and password. Sorry if i explain this badly, hope you understand
  7. Hi, I'm trying to 'automate' my site a little to take out some of the manual work. I currently have an order system in which a customer will browse and add items to the cart, when finished the contents of the cart and customer details are emailed to me via a form. I then have to create a new .php page which is an invoice and allows the person to pay. Is there anyway to create a new .php upon submitting a form? It would need to contain the data below. <?php // i have some php code here ?> <!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=utf-8" /> <title>xxxxxxxxxxxx - Invoice</title> // few .css and a script here </head> <body> <table width="612" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center"><p><img src="../../images/catalogue/orderstatus_title.png" width="400" height="100" alt="order"><br> </p></td> </tr> <tr> <td align="center"><hr /></td> </tr> <tr> <td align="center"><table width="40%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="2"><?php // unique customer order number $sql="SELECT * FROM orderTable WHERE orderNum = 'xxxxxxxx' AND userId = '{$_SESSION['user_id']}'"; if ($query=@mysql_query($sql)) { if (mysql_num_rows($query) > 0) { while ($req=mysql_fetch_array($query)) { ?></td> </tr> <tr> <td width="36%" bgcolor="#CDE3F3">Customer name</td> <td width="64%" align="center" bgcolor="#CDE3F3"><input name="textfield7" type="text" disabled="disabled" id="textfield7" value="<?php echo $req['lastName'];?>, <?php echo $req['firstName'];?>"></td> </tr> <tr> <td bgcolor="#CDE3F3">Order Date</td> <td align="center" bgcolor="#CDE3F3"><input name="textfield" type="text" disabled="disabled" id="textfield" value="<?php echo $req['orderDate']; ?> "/></td> </tr> <tr> <td bgcolor="#CDE3F3">Order Number</td> <td align="center" bgcolor="#CDE3F3"><input name="textfield8" type="text" disabled="disabled" id="textfield8" value="<?php echo $req['orderNum'];?>"></td> </tr> <tr> <td colspan="2"><span class="description"> <?php } } else { echo "Your Invoice could not be found! Please try again later."; } } else { echo "Query failed ".mysql_error(); } ?> </span></td> </tr> </table></td> </tr> <tr> <td align="center"><p class="loginform"><span class="errorMessage">If the above details are correct, enter your username and password below.<br> <a href="xxxxxxxxxx">Not you?</a> Please check your order number and try again. </span><br> <br> </p></td> </tr> <tr> <td align="center"><hr /></td> </tr> <tr> <td align="center"><form name="form" method="post" action="<?php echo $_SERVER['../../login/PHP_SELF']; ?>"> <p> <label for="txtUsername">Username:</label> <br /> <input type="text" title="Enter your Username" name="txtUsername" /> </p> <p> <label for="txtpassword">Password:</label> <br /> <input type="password" title="Enter your password" name="txtPassword" /> </p> <p> <input type="submit" onclick="confirm_log_in()" onclick="return log_in()" name="Submit" value="Login" /> </p> </form></td> </tr> <tr> <td align="center" class="credit">You should have received an email containing your username and password after your order has been processed. Please allow up to 24 hours after submitting your order to receive this email. Keep your details safe as you will need them each time you want to access this page.<br /> <br /> If you still have not received your details or cannot log in then please <a href="xxxxxxxxxxxx/contact-us">contact us</a>. By clicking 'Login' you agree that you are the customer stated above or have permission from the customer. For security your IP address will be logged.</td> </tr> <tr> <td><hr /></td> </tr> <tr> <td><?php } else { ?></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr align="center"> <td><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="2" align="center"><p>Below you will find details regarding your order, please check everything is correct BEFORE you submit payment. <br /> If you need to amend anything please <a href="xxxxxxxxxxxxxxxxcontact-us">contact us</a><br> <br> <?php // unique customer order number $sql="SELECT * FROM orderTable WHERE orderNum = 'xxxxxxxxxxxx' AND userId = '{$_SESSION['user_id']}'"; if ($query=@mysql_query($sql)) { if (mysql_num_rows($query) > 0) { while ($req=mysql_fetch_array($query)) { ?> </p></td> </tr> <tr> <td width="100%" colspan="2" align="center"><textarea name="textarea" id="textarea" cols="90" rows="20"><?php echo $req['strMessageBody']; ?></textarea> <br></td> </tr> <tr> <td colspan="2" align="center"><hr /></td> </tr> <tr> <td colspan="2" align="center"><img src="../../images/catalogue/payment_title.png" width="400" height="100" alt="payment"></td> </tr> <tr> <td colspan="2" align="center"><br></td> </tr> <tr> <td colspan="2" align="center"><form id="form1" name="form1" method="post" action="xxxxxxxxxxxxxxxxPayment_Information.php"> <table width="40%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="240" align="center" bgcolor="#CDE3F3"><p>Total in GBP(£)</p></td> <td width="190"><input name="amount" type="text" id="amount" value="<?php echo $req['total'];?>" readonly="readonly" /></td> </tr> <tr> <td> </td> <td><label> <input type="submit" name="submit" id="submit" value="Submit" /> </label></td> </tr> </table> </form></td> </tr> <tr> <td colspan="2" align="center">To confirm invoice amount, please press the submit button above, once your payment has been received your order can begin to be built. <br /> <br /> </td> </tr> <tr> <td colspan="2" align="center"><span class="description"> <?php } } else { echo "Your Invoice could not be found! Please try again later."; } } else { echo "Query failed ".mysql_error(); } ?> </span></td> </tr> </table> <p> </p></td> </tr> </table></td> </tr> <tr> <td><?php } ?></td> </tr> </table> </body> </html> as you can see above all this page really does is list the products and few customer details. The point of the page is because i have a 'pay' link at the bottom which direct to paypal. The main problem i can see is the script call from a unique table in mysql database Each page i have to manually change this at the moment so i don't know if its even possible to change this according to the invoice number being sent. Sorry about the long post, hope you understand my goal. Thank you in advance.
  8. Hi again, so far everyone been a huge help but once again i'm in need of you expertise So when a customer checks out, after filling in an order form its processed through a script called 'checkout_process.php' here is a snippet of the part that shows what was in the cart $strMessageBody = "$REMOTE_ADDR\n"; $strMessageBody .= "Order Date : $today \n"; $strMessageBody .= "Your Order Number #"; $strMessageBody .= "$order \n"; $strMessageBody .= "We have received your order for processing.\n"; $strMessageBody .= "Bill To: \n"; $strMessageBody .= "-------- \n"; $strMessageBody .= " $b_first $b_last \n"; $strMessageBody .= " $b_addr \n"; $strMessageBody .= " $b_addr2 \n"; $strMessageBody .= " $b_city, $b_zip \n"; $strMessageBody .= " $b_phone \n"; $strMessageBody .= " $b_fax \n"; $strMessageBody .= " $b_email \n"; $strMessageBody .= " \n"; $strMessageBody .= " \n"; $strMessageBody .= "Qty Price(\£) Product ID - Product Name\n"; $strMessageBody .= "===================================================================== \n"; $strMessageBody .= "$QUANTITY_1 \$$PRICE_1 $ID_1 - $NAME_1 $ADDTLINFO_1 \n"; if( $NAME_2 ) {$strMessageBody .= "$QUANTITY_2 \$$PRICE_2 $ID_2 - $NAME_2 $ADDTLINFO_2 \n";} if( $NAME_3 ) {$strMessageBody .= "$QUANTITY_3 \$$PRICE_3 $ID_3 - $NAME_3 $ADDTLINFO_3 \n";} if( $NAME_4 ) {$strMessageBody .= "$QUANTITY_4 \$$PRICE_4 $ID_4 - $NAME_4 $ADDTLINFO_4 \n";} if( $NAME_5 ) {$strMessageBody .= "$QUANTITY_5 \$$PRICE_5 $ID_5 - $NAME_5 $ADDTLINFO_5 \n";} if( $NAME_6 ) {$strMessageBody .= "$QUANTITY_6 \$$PRICE_6 $ID_6 - $NAME_6 $ADDTLINFO_6 \n";} if( $NAME_7 ) {$strMessageBody .= "$QUANTITY_7 \$$PRICE_7 $ID_7 - $NAME_7 $ADDTLINFO_7 \n";} if( $NAME_8 ) {$strMessageBody .= "$QUANTITY_8 \$$PRICE_8 $ID_8 - $NAME_8 $ADDTLINFO_8 \n";} if( $NAME_9 ) {$strMessageBody .= "$QUANTITY_9 \$$PRICE_9 $ID_9 - $NAME_9 $ADDTLINFO_9 \n";} if( $NAME_10 ){$strMessageBody .= "$QUANTITY_10 \$$PRICE_10 $ID_10 - $NAME_10 $ADDTLINFO_10 \n";} if( $NAME_11 ){$strMessageBody .= "$QUANTITY_11 \$$PRICE_11 $ID_11 - $NAME_11 $ADDTLINFO_11 \n";} if( $NAME_12 ){$strMessageBody .= "$QUANTITY_12 \$$PRICE_12 $ID_12 - $NAME_12 $ADDTLINFO_12 \n";} if( $NAME_13 ){$strMessageBody .= "$QUANTITY_13 \$$PRICE_13 $ID_13 - $NAME_13 $ADDTLINFO_13 \n";} $strMessageBody .= "===================================================================== \n"; $strMessageBody .= "TOTAL: $TOTAL \n"; $strMessageBody .= "\n"; $strMessageBody .= "Comments: \n"; $strMessageBody .= "--------- \n"; $strMessageBody .= "$comment \n"; $strMessageBody .= " \n"; $strMessageBody .= "Please contact us at $youremail. If you have any questions or concerns, please reference your OrderID# $order."; I have a page on my site which is showing all orders new and old, i want to display the items purchased on it but what i have done seems very messy and doesn't really display as i want it, for example, empty values are shown as a 0 Here is the table im using to display the info so you can see what im trying to achieve <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><?php $sql="SELECT * FROM orderTable WHERE userId = '{$_SESSION['user_id']}'"; if ($query=@mysql_query($sql)) { if (mysql_num_rows($query) > 0) { while ($req=mysql_fetch_array($query)) { ?></td> <td width="502"> </td> </tr> <tr> <td class="description">Order Number:</td> <td><input name="textfield" type="text" disabled id="textfield" value="<?php echo $req['orderNum'];?>"></td> </tr> <tr> <td class="description">Date:</td> <td><input name="textfield" type="text" disabled id="textfield" value="<?php echo $req['orderDate'];?>"></td> </tr> <tr> <td class="description">Invoice Total:</td> <td><input name="textfield" type="text" disabled id="textfield" value="<?php echo $req['total'];?>">*does not include delivery or discounts</td> </tr> <tr> <td class="description">Product(s)</td> <td><textarea name="textarea3" cols="45" rows="3" disabled id="textarea3"> <?php echo $req['quantityOne'];?> <?php echo $req['nameOne'];?> <?php echo $req['quantityTwo'];?> <?php echo $req['nameTwo'];?> <?php echo $req['quantityThree'];?> <?php echo $req['nameThree'];?> <?php echo $req['quantityFour'];?> <?php echo $req['nameFour'];?> <?php echo $req['quantityFive'];?> <?php echo $req['nameFive'];?> <?php echo $req['quantitySix'];?> <?php echo $req['nameSix'];?> <?php echo $req['quantitySeven'];?> <?php echo $req['nameSeven'];?> <?php echo $req['quantityEight'];?> <?php echo $req['nameEight'];?> <?php echo $req['quantityNine'];?> <?php echo $req['nameNine'];?> <?php echo $req['quantityTen'];?> <?php echo $req['nameTen'];?> <?php echo $req['quantityEleven'];?> <?php echo $req['nameEleven'];?> <?php echo $req['quantityTwelve'];?> <?php echo $req['nameTwelve'];?> <?php echo $req['quantityThirteen'];?> <?php echo $req['nameThirteen'];?> </textarea></td> </tr> <tr> <td width="122" class="description">Name:</td> <td><input name="textfield" type="text" disabled id="textfield" value="<?php echo $req['lastName'];?>, <?php echo $req['firstName'];?>"></td> </tr> <tr> <td class="description">Address:</td> <td><textarea name="textarea2" cols="45" rows="3" disabled id="textarea2"><?php echo $req['address1'];?>, <?php echo $req['address2'];?> <?php echo $req['city'];?>, <?php echo $req['postCode'];?> </textarea></td> </tr> <tr> <td class="description">Contact:</td> <td>Tel: <input name="textfield" type="text" disabled id="textfield" value="<?php echo $req['phone'];?>"> Fax:<input name="textfield" type="text" disabled id="textfield" value="<?php echo $req['fax'];?>"></td> </tr> <tr> <td class="description">Additional Information</td> <td><textarea name="textarea" cols="45" rows="4" disabled id="textarea"><?php echo $req['comment'];?></textarea></td> </tr> <tr> <td colspan="2" class="description"><?php } } else { echo "No orders found."; } } else { echo "Query failed ".mysql_error(); } ?></td> </tr> </table> as you can see the product bit is super messy and i doesn't display right, it also means i have 13 lines in my table for quantity and another 13 for the name, doesn anyone have an idea an how to tidy this up?
  9. @gristoi umm... Well i do now! You Sir are my hero, i really do owe you beer! Thank you very much, that got it. @AyKay47 Thank you, what does print_r do? Just print it on screen?
  10. Thanks for the reply. I tried that and its still isn't working. I tried adding; $userId = $_SESSION['user_id'] or die("Cannot find UserID, make sure you are logged in."); $userName = $_SESSION['user_name'] or die("Cannot find UserName, make sure you are logged in."); at the top of my script and calling the $userId and $userName instead but its return the error string i put in when i hit submit "Cannot find UserID, make sure you are logged in." Any ideas what i may be doing wrong?
  11. On my login page i have $_SESSION['user_id']= $id; $_SESSION['user_name'] = $full_name; I am writing the values to the database with mysql_connect("xxx.xxx.com", "$username", "$password") or die( "Unable to connect to database"); mysql_select_db("xxx") or die( "Unable to select database"); mysql_query("INSERT INTO orderTable (ip, userId, userName, id, orderNum, orderDate, custEmail, firstName, lastName) VALUES ('" . $REMOTE_ADDR . "', '" . $userId = $_SESSION['user_id'] . "', '" . $userName = $_SESSION['user_name'] . "','', " . $order . ", '" . $today . "', '" . $b_email . "', '" . $b_first . "', '" . $b_last . "')"); The table show all the details apart from the userid and username, they just appear blank. I really have no idea whats going on.
  12. Is there anyway to get the users current session variables, like there user_id and user_name and save them to another database? what im trying to do is save the details of an order form to a database upon hitting submit, so far i have it sending over a few details from the order form but i want it to get the users id and username and save that on the database too (users have to be logged in already to actually send an order). So far my attempts have failed, any help appreciated.
  13. I wrote // save to database mysql_connect("xxx.xxx.com", "$username", "$password"); mysql_select_db("membership") or die( "Unable to select database"); $query = "INSERT INTO orderTable ('user_id', 'id', 'orderNum', 'orderDate', 'custEmail', 'firstName', 'lastName') VALUES ('&user_id', '', $order', '$today', '$b_email', '$b_first', '$b_last')"; // save end but it still isn't adding anything to the table
  14. Thanks to teynon we solved a problem i had yesterday, but that had led to a new problem. I want to save my form data to a database. The form itself is a checkout form, it sends me an email of all the items a customer wants (products are made to order) so i then reply to each one. I want to save the customer name, order number and date it was ordered to a database. The order form is targeting a file called 'checkout_process.php', in this script the order number is generated before the email is sent; $today = date('l jS F Y h:i:s A'); $strMessageBody = "$REMOTE_ADDR\n"; $strMessageBody .= "Order Date : $today \n"; $strMessageBody .= "Your Order Number #"; $strMessageBody .= $order = date ("dmyHis\n"); $strMessageBody .= "We have received your order for processing.\n"; $strMessageBody .= "Bill To: \n"; $strMessageBody .= "-------- \n"; $strMessageBody .= " $b_first $b_last \n"; $strMessageBody .= " $b_addr \n"; $strMessageBody .= " $b_addr2 \n"; $strMessageBody .= " $b_city, $b_zip \n"; $strMessageBody .= " $b_phone \n"; $strMessageBody .= " $b_fax \n"; $strMessageBody .= " $b_email \n"; $strMessageBody .= " \n"; $strMessageBody .= " \n"; $strMessageBody .= "Qty Price(\£) Product ID - Product Name\n"; $strMessageBody .= "===================================================================== \n"; $strMessageBody .= "$QUANTITY_1 \$$PRICE_1 $ID_1 - $NAME_1 $ADDTLINFO_1 \n"; if( $NAME_2 ) {$strMessageBody .= "$QUANTITY_2 \$$PRICE_2 $ID_2 - $NAME_2 $ADDTLINFO_2 \n";} if( $NAME_3 ) {$strMessageBody .= "$QUANTITY_3 \$$PRICE_3 $ID_3 - $NAME_3 $ADDTLINFO_3 \n";} if( $NAME_4 ) {$strMessageBody .= "$QUANTITY_4 \$$PRICE_4 $ID_4 - $NAME_4 $ADDTLINFO_4 \n";} if( $NAME_5 ) {$strMessageBody .= "$QUANTITY_5 \$$PRICE_5 $ID_5 - $NAME_5 $ADDTLINFO_5 \n";} if( $NAME_6 ) {$strMessageBody .= "$QUANTITY_6 \$$PRICE_6 $ID_6 - $NAME_6 $ADDTLINFO_6 \n";} if( $NAME_7 ) {$strMessageBody .= "$QUANTITY_7 \$$PRICE_7 $ID_7 - $NAME_7 $ADDTLINFO_7 \n";} if( $NAME_8 ) {$strMessageBody .= "$QUANTITY_8 \$$PRICE_8 $ID_8 - $NAME_8 $ADDTLINFO_8 \n";} if( $NAME_9 ) {$strMessageBody .= "$QUANTITY_9 \$$PRICE_9 $ID_9 - $NAME_9 $ADDTLINFO_9 \n";} if( $NAME_10 ){$strMessageBody .= "$QUANTITY_10 \$$PRICE_10 $ID_10 - $NAME_10 $ADDTLINFO_10 \n";} if( $NAME_11 ){$strMessageBody .= "$QUANTITY_11 \$$PRICE_11 $ID_11 - $NAME_11 $ADDTLINFO_11 \n";} if( $NAME_12 ){$strMessageBody .= "$QUANTITY_12 \$$PRICE_12 $ID_12 - $NAME_12 $ADDTLINFO_12 \n";} if( $NAME_13 ){$strMessageBody .= "$QUANTITY_13 \$$PRICE_13 $ID_13 - $NAME_13 $ADDTLINFO_13 \n";} $strMessageBody .= "===================================================================== \n"; $strMessageBody .= "TOTAL: $TOTAL \n"; $strMessageBody .= "\n"; $strMessageBody .= "Comments: \n"; $strMessageBody .= "--------- \n"; $strMessageBody .= "$comment \n"; $strMessageBody .= " \n"; $strMessageBody .= "Please contact us at $youremail. If you have any questions or concerns, please reference your OrderID# $order."; How can i grab some of these details and send them too the sql database before/when the email sends? Thanks in advance
  15. Perfect! All i need now is a way to add these values to the database when a user sends an order through, but i can see this be quite complicated because the order number is generated by using then added to message body, its not saved anywhere. Don't suppose you have any ideas on how i would go about grabbing this and saving it in my order table along with the date?
  16. Thank you very much Sir! That was very helpful. Now forgive me if this sounds stupid, My preivous orders wasn't being stored in sql database, so i just added a new table with 'id', 'orderNum' and 'orderDate'. For the 'id' field im typing in the customers 'user_id'. This seems to work as the order number and date also being displayed correctly for the right user, but i cannot add another order because im already using the user_id. Is there a way to display more data, in this case older or multiple orders? Thanks for your time.
  17. I'm trying to create a profile page, i have the users able to register, login etc.. But they are currently all redirected to the same 'myaccount' page. I want there page to be unique and have information relevant to them, such as current orders and previous orders. Im struggling to grasp how to do this though as my coding skills are extremely limited as you can probably tell. If you have a better way to do this please tell me, im all ears. Also thank you requinix, but i now need to grab the current logged in users id, how would i go about this?
  18. I want to add unique information to a page on my site depending on the user id number, so i thought of doing this; <?php if ( is_user_logged_in() ) { if ( $user_id = 2 ) { // xxxxxxxxxxxxxxx } elseif ( $user_id = 3 ) { // xxxxxxxxxxxxxxx } } else { // blank } ?> would be the unique information i want to show. After a while this script would become huge if i had to type all the info in, so is there anyway to show data from an external script. Say i had a script somewhere called 'user_1.php for the person logged in with the user_id of 1, 'user_2.php for the person logged in with the user_id of 2 and so on... In this script (user_1.php) i had the information i want displayed which would be something like; Current order(s) [link to order] Previous order(s) [link to order] Hope you understand what im trying to do, really appreciate any help as soon as you can. Thank you.
  19. OK, i fixed it by changing my link in the php's. The new problem is it seems to have broken other scripts, i have a rating system on each page which no longer works when using the new links any idea what i need to look at to solve it? Im calling the script with <?php require('_drawrating.php'); ?> and on the page echo rating_bar('prod_num',''); It no longer seems to work, im not changing the name of _drawrating in the htaccess so im not sure whats up
  20. Thanks for the reply. It still appears to not work, the address isn't changing, unless im doing something wrong. Does the .htaccess file have to go in the same category? So lets say for the 'garden' link, do i have to put a .htaccess in the members/products/ folder, and same for all other folders, or is it just one file in the root directory? Do i need to alter my .php in any way? Appreciate your patience.
  21. Sorry i poorly explained what i'm trying to achieve. What im trying to do is hide the file structure of my site so at the moment for example my 'garden' category is at www.website.com/members/products/garden.php. I just want that to appear as www.website.com/category=garden. It doesn't have to be exactly that, but that's easier for me to identify
  22. I'm trying to rename my urls in the address bar but for some reason it isn't taking any effect 4 pages i have tried on so far, the url in the web browser remains the same, am i missing something or is there something i need too change on my actual .php's? At the moment i haven't touched them and only uploaded the htaccess to my root directory. Options +FollowSymLinks RewriteEngine on RewriteRule ^/members/products/garden\.php$ category=garden [L] RewriteRule ^/members/products/home\.php$ category=home [L] RewriteRule ^/members/products/pets\.php$ category=pets [L] RewriteRule ^/members/products/gifts\.php$ category=gifts [L]
  23. Have you had chance to look it over yet?
  24. I been having a try but it just leaves the username and password field blank, i'm probably being stupid but if you could have a quick look over it please <?php //error_reporting(0); if(count($_POST)){ $custReply = $_POST; /////////////////settings///////////////////// $yourname = "xxxxxxxxxx"; $youremail = "[email protected]"; $subject = "Your Online Order"; $message = "Thank you for ... blah blah"; $message2 = "To check the status of your account please log in using the details below:"; $website = "www.xxxxxxxxxxx.co.uk"; /////////////////////////////////////////// if(empty($custReply['custname']) || empty($custReply['custemail'])){ die ("Customer name or email field is empty! <br/> <a href=\"email.php\"/>Return Back</a>"); } $to = "$custemail"; $subject = "$subject"; $message = "$message"; $message2 = "$message2"; $custuser = "$custuser"; $custpass = "$custpass"; $custemail = $_POST['custemail']; $custname = $_POST['custname']; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\n"; $headers = "From: $yourname<$youremail>\r\n"; $headers .= "X-Mailer: PHP's mail() Function\n"; $body = "Dear $custname, \n\n $message \n\n $message2 \n Your Username: $custuser Your Password: $custpass \n\n\n Regards, \n http://$website\n"; mail($to, $subject, $body, $headers); echo "<font color=\"green\" size=\"+2\">E-mail successfully sent to ($custname)!</font>"; }else{ echo "<font color=\"red\" size=\"+2\">Mail Not Sent!</font>"; } ?>
  25. I owe you one sir, that's perfect, thank you. The only thing i need to change is it requires you to enter a username and password (demo) in order to send the mail, i needed the u/n and p/w boxes to be input field so i could write the account info in there and it would be sent to the customer. So the output would be something like; I really appreciate for all your help. Thanks
×
×
  • 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.