Jump to content

leony

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

leony's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi I have seen this feature on www.everyfloor.com When you click on grey - orange images another div comes out. How do I do the same effect? I cannot seem to find any example code that I can modify. Thanks.
  2. Hi, For your sample code, I have noticed that as long as the contact value is NULL, the query is executed , however if it is not, I get an error message. The column is NULL meanwhile. Thanks...
  3. Hello, I have an HTML form and it collects customer address, tel no, post code etc...However all these fields are not required as in the following: <select name="contact"> <option value="0" selected="selected">Select</option> <option value="1">Yes</option> <option value="2">No</option> </select> If the customer does not select anything, I want to insert a NULL value to the database, because, I cannot get it right, instead of NULL value, I have to use a ZERO (0) value. INSERT INTO table (first_name, last_name, house_no, street, city, county, postcode, email, phone, contact insert_date) VALUES ('$first_name', '$last_name', '$house_name', '$street', '$city', '$county', '$postcode', '$email', '$telephone', $contact, NOW())"; There are lots of 0s in the database and somehow I want to insert NULL value instead of zero. How can it be done? Thanks...
  4. Hi I have uncommented these two but it is still not working: LoadModule rewrite_module modules/ApacheModuleRewrite.dll LoadModule rewrite_module modules/mod_rewrite.so Do I have to do anything else? Note: My Apache files are on C drive and websites files are on F drive. Document root is F:/.... Can this be the problem?
  5. Hello, My mod rewrite works on my web hosting company but I cannot get it work in Windows XP. How do I need to configure the Apache config file? I searched the web but not found much info, some solutions did not work. My document root is drive F which is F:/websites (If you wanted to give example code, you can use F:/websites) Thanks....
  6. Hi I have a MYSQL query for my searc page. How can I assign more importance to "title" column than "body_text2 column? $sql = "SELECT *, MATCH(title, body_text) AGAINST ('$keyword') AS score FROM my_table WHERE MATCH(title, body_text) AGAINST('$keyword') ORDER BY score";
  7. So what is the solution in this situation? ---------------- I think I have found it: To use number_format() <? $number = 2.16/0.36; $number = number_format($number,2); echo "$number<br>"; echo ceil($number); ?>
  8. Hi, Can anybody tell me why the following code outputs different results: <? $number = 2.16/0.36; echo "$number<br>"; echo ceil($number); ?> Output: 6 7
  9. leony

    PHP header

    I am not sure how to do the proper redirection to confirmation.php if I use just this: header("Location: confirmation.php"); Any pesson can see this page typing the URL. I dont want that to happen. I want to define a page source for it. (No access to confirmation.php if you are not being redirected from form_process.php)
  10. leony

    PHP header

    Thanks for the reply. My code structure as follows: if(isset($_POST['submit'])) { //validate //enter in the database //if everything OK; send email //if mail is successful redirect to confirmation.php } else { header("Location: index.php"); } The reason I am redirecting is to lose all submit values as the person refreshes the page again, there will be duplicate mysql rows. I do not know whether there is another way how to prevent duplicate records.
  11. I store all cart info in the database, as it seems a better option for my application. The difficultness depends on how experience you are. If you are not, believe me you will have to spend some time for the bugs, failures so forth. If you have a website which is straighforward, the cart applciation should not be that difficult.
  12. Hello, I have a page which a customer enters all his details and when he clicks on "Send this form", all the information goes to form_process.php. From this page (if validation is OK), I would like to direct the person the the confirmaton.php (which says Thank you blah...blah) However, even if someone calls this confirmation.php directly, they will see the page straight away without going through the validation. How can I prevent that? Basically what I want to do, if confirmation.php is called directly, the person needs to be directed to the home page etc... Thank you.
  13. Sorry, it is my mistake.1and1 is running PHP4 but I tired the PHP MAILER 5. Thank you for your reply.
  14. Hi, I am trying to use PHP mailer but have a weird problem. <?PHP require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "smtp(1and1 server)"; // SMTP server $mail->SMTPAuth = TRUE; $mail->Username = "a@a.com"; $mail->Password = "password"; $mail->From = "a@a.com"; $mail->FromName = "Our company"; $mail->AddAddress("to@yahoo.com"); $mail->Subject = "First PHPMailer Message"; $mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer."; $mail->WordWrap = 50; if(!$mail->Send()) { echo 'Message was not sent.'; echo 'Mailer error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent.'; } ?> The following files are in the same directory with the above code: phpmailer.lang-en.php class.phpmailer.php And when I call the page, I get the following error: Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/21/d130682581/htdocs/page/class.phpmailer.php on line 45 public $Priority = 3; According to the dreamweaver, this is the line 45 in class.phpmailer.php I have not modified anything in this file btw.
  15. Sorry I think that is a php class, so that I will just put it on the server and include it. correct?
×
×
  • 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.