Everything posted by POWERPLAY27
-
PHP in HTML, want to add DATE/TIME
Thanks for your help.
-
PHP in HTML, want to add DATE/TIME
How would I change the color of the font for the time/date displayed? I found this code on another forum and used it in my code, but its not having any effect: echo <font color="#FFF"> . date('d-m-Y - H:ia') . </font>;
-
Positioning PHP content
It's cool figured it out, cheers.
-
Positioning PHP content
Thanks, makes sense. I've inserted a php statement for date/time in a div classed as time, I've went into my css file. I uploaded my php file and css file to my web domain, but it doesn't seem the css file is being read. Any ideas why?
-
Positioning PHP content
Echo displays some sort of output, but how do you move that output around the page? CSS?
-
PHP in HTML, want to add DATE/TIME
This is what I came to understand late on, that any html file that contains PHP, even if very minimal has to have the .php extention. Slowly slowly learning something new about php, which I'm pleased about. echo date(); that doesn't output the date/time, is there anything else I have to add? My bad, I just realised "d-m-Y", and viola, now to display the time, what do I need to add? EDIT: Just done it, for reference to anyone that needs to know this: <?php $date = date("format", $timestamp); echo date('d-m-Y - H:ia'); ?>
-
PHP in HTML, want to add DATE/TIME
I've tried to echo hello; but nothing comes up, I've even uploaded it to my website domain to see if there is a difference, but nothing.
-
PHP in HTML, want to add DATE/TIME
Ok, so how do I change the color of the time/date? My website background is black, is that why I can't see the time and date? I've used echo date(); but I can't see it in my webpage, I'm not actually sure if the php tag is recognised, because the writing of the tag does not change to red.
-
PHP in HTML, want to add DATE/TIME
I want to display the date and time in my html page, I have inserted <?php echo time(); ?>, but the writing stays blue, same as the html coding, does that mean the php tag is ignored?
-
Bold
Tried it, can't get it to work. I will just leave it as it is, as long as the information is sent to email I am happy.
-
Bold
How do I get this writing to be bold: $sent = mail ($to, $subject,"Name: $fullname\r\n\r\nCompany: $company\r\n\r\nEmail: $email\r\n\r\nTel No: $telno\r\n\r\nEnquiry: $enquiry", $headers);
-
Sending form data to an email address
Ok, I absolutely baffled, its now working. I don't know what exactly made it start working, but it has. Thank you all for all your help, you dedicated time to my problem, I appreciate that! Thank you.
-
Sending form data to an email address
Are you seeing Contact Us as the subject of an email that you receive? YES. Are you filling in and submitting the form on your online page from your own website and domain (not submitting from a local file on your computer? Submitting from own website uploaded FTP. Does your host support PHP (if it sends an empty email, it must do). Believe so, yes it does send the email. Does your host send emails via php (it seems that it does)? Yes
-
Sending form data to an email address
I've echo'd $fullname Tried: echo $fullname; output = nothing echo '$fullname'; output = $fullname echo "$fullname"; output nothing. Nothing seems to be passed from the user input for fullname and its the same with the rest.
-
Sending form data to an email address
Any ideas, anyone? Why is my user data not appearing in the body of my email?
-
Sending form data to an email address
Ok in terms of the actual sending of the email that works, the problem is the user input data is not showing up in the body of the email: New code: <?php $to = "louis.andre@gmail.com"; $subject = "Contact_Us"; $fullname = $_POST['fullname']; $company = $_POST['company']; $email = $_POST['email'] ; $telno =$_POST['telno']; $enquiry =$_POST['enquiry']; $admin= "louis.andre@gmail.com"; $headers = "From: $admin"; $sent = mail ($to, $subject,"$fullname\r\n$company\r\n$email\r\n$telno\r\n$enquiry", $headers); if($sent) {print "Thank you, we have received your enquiry and we will try to respond back to you within 48 hours."; } else{ print "We encountered an error and did not receive your enquiry.";} ?> <div id="contact"> <form class="contactcontent" name="myForm" METHOD="post" ACTION="send_form.php" > <label for="fullname">Full Name:</label> <input type="text" id="fullname" name="fullname" size="40" ><br /><br /> <label for="company">Company:</label> <input type="text" id="company" name="company" size="40" ><br /><br /> <label for="email">Email Address:</label> <input type="text" id="email" name="email" size="40" ><br /><br /> <label for="telno">Contact Tel No:</label> <input type="text" id="telno" name="telno" size="20" ><br /><br /><br /><br /> <label for="enquiry">Please Insert Your Enquiry Here:</label> <br /> <textarea name="enquiry" id="enquiry" rows="10" cols="65"></textarea><br /><br /> <input type="submit" id="submit" value="Submit" name="submit"/><input type="reset" id="clearFrm" Value="Clear Form" name="Reset"/> </form> </div>
-
Sending form data to an email address
I realized those mistakes and changed them, the code I posted above I was getting errors, I've sorted those out.
-
Sending form data to an email address
I thought that might do it, but still same problem. Thanks for response, good guess.
-
Sending form data to an email address
I tried it, but unfortunately doesn't work. I'm not sending it to my domain email. I'm sending it to my google account, could that in itself be the problem?
-
Sending form data to an email address
I've changed the method from $_REQUEST to $_POST.....still the same outcome.
-
Sending form data to an email address
Thank you for your help, thats sorted it out and I receive an email now when I submit the form, however in the body I only see ", , ," visible (without the quotes) The user input in the form is not sent with the email?
-
Sending form data to an email address
Ok, I've done that..... Here is my php code: <div id="contact"> <form class="contactcontent" name="myForm" enctype="text/plain" "javascript" METHOD="post" ACTION="sent_form.php" onsubmit="return validateForm(myForm)"> <label for="fullname">Full Name:</label> <input type="text" id="fullname" name="fullname" size="40" /><br /><br /> <label for="company">Company:</label> <input type="text" id="company" name="company" size="40" /><br /><br /> <label for="email">Email Address:</label> <input type="text" id="email" name="email" size="40" /><br /><br /> <label for="telno">Contact Tel No:</label> <input type="text" id="telno" name="telno" size="20" /><br /><br /><br /><br /> <label for="enquiry">Please Insert Your Enquiry Here:</label> <br /> <textarea name="enquiry" id="enquiry" rows="10" cols="65" /></textarea><br /><br /> <input type="submit" id="submit" value="Submit" name="submit"/><input type="reset" id="clearFrm" Value="Clear Form" name="Reset"/> </form> </div> <!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></title> </head> <body> <?php $to = "louis.andre@hotmail.com"; $subject = "Contact_Us"; $email = $_REQUEST['email'] ; $fullname = $_REQUEST['fullname']; $company = $_REQUEST['company']; $telno =$_REQUEST['telno']; $enquiry =$_REQUEST['enquiry'];*/ $headers = "From: $email"; $sent = mail ($to, $subject, $email, $fullname, $company, $telno, $enquiry, $headers); if($sent) {print "Thank you, we have received your enquiry and we will try to respond back to you within 48 hours."; } else{ print "We encountered an error and did not receive your enquiry.";} ?> </body> </html> This coding is not from php/mysql bible, I got it from an internet site I googled a few minutes ago. I've changed what is required to match my form, I looked in my email account, nothing there. I'm getting this error.... Warning: mail() expects at most 5 parameters, 8 given in /homepages/37/d421780152/htdocs/send_form.php on line 21 We encountered an error and did not receive your enquiry. Ok got rid of that error by only using the 5 parameters expected: ($to, $subject, $fullname, $enquiry, $headers); What I don't understand is why only 5 expected? I'm now getting the unsuccessful error alone: "We encountered an error and did not receive your enquiry." On one hand its working as I would like it to, but on the other, the form is not sent to my mail, any ideas why?
-
Sending form data to an email address
Nope, how do I go about doing this?
-
Sending form data to an email address
I have code for sending form data to an email address, which I obtained from PHP5/MYSQL Bible. When I send the form it doesn't seem to be working, this is the output: ${ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); } if($from == '') {print "You have not entered an email, please go back and try again";} else { if($name == '') {print "You have not entered a name, please go back and try again";} else { $send = mail($to, $subject, $body, $headers); $send2 = mail($from, $subject2, $autoreply, $headers2); if($send) {header( "Location: http://www.sign-technologies.net/form_sent.htm" );} else {print "We encountered an error sending your mail, please notify webmaster@YourCompany.com"; } } } ?> Is this, because I don't have PHP installed on my computer?