
QWERTYtech
Members-
Posts
26 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
QWERTYtech's Achievements

Newbie (1/5)
0
Reputation
-
I was looking for a script that will read a directory and automatically create thumbnails of the images in it and then allow you to click on them to open the full image. Does anyone have anything or know of anything out there?
-
By any chance could u help me with the PHP validation instead of the JAVAscript? I would greatly appreciate it.
-
they are both 'S' . Still nothing.
-
Okay, I have implemented an ImageVerification into my Registration page. Is anyone familiar with ThickBox? Since I have implemented this into my registration page, i can't open it using ThickBox.... Anyone know where i can find a really good ImageVerification app?
-
already have done that... nothing... this is what the submit btn code looks like now.... <input type="submit" value="Submit" name="Submit" ONCLICK="javascript:validateForm()">
-
It was named B1 but I changed it to submit but nothing happened again.
-
Nothing was stored in the DB and no the "hello world" did not show up.
-
Well I changed to button to Submit type and tried it. I did not get anything in my mail.... hmmmm.... any other ideas?
-
Contact.html <form name="phpformmailer" action="mailer.php" align="center" method="post"> <div align="center"> <center> <table bgcolor="#F2F2F2" width="528" cellspacing="6"> <tr> <td width="159"><strong>Contact Us</strong></td> <td width="349"><a href="index.html">Home</a> > <a href="contact.html">Conctact Us</a></td> </tr> <tr> <td align="right" width="159"><small>Your name:</small></td> <td width="349"><font face="Arial"><input class="inputc" size="29" name="name"></font></td> </tr> <tr> <td align="right" width="159"><font color="red" size="1">*</font><small> Your email address:</small></td> <td align="left" width="349"><font face="Arial"><input class="inputc" size="29" name="email"></font></td> </tr> <tr align="middle"> <td align="right" width="159"><font color="red" size="1">*</font><small> Confirm email address:</small></td> <td width="349" align="left"><font face="Arial"><input class="inputc" size="29" name="email2"></font></td> </tr> <tr> <td align="right" width="159"><font color="red" size="1">*</font><small> Subject:</small></td> <td width="349"><font face="Arial"><input class="inputc" size="29" name="thesubject"></font></td> </tr> <tr> <td align="right" width="159"> <p><font color="#000080" size="1">*</font><small> Your request or query:</small></td> <td width="349"><textarea style="FONT-SIZE: 10pt" name="themessage" rows="7" cols="27"></textarea></td> </tr> <tr> <td width="159"></td> <td width="349"> <script language="JavaScript"><!-- function validateForm() { var okSoFar=true with (document.phpformmailer) { var foundAt = email.value.indexOf("@",0) if (foundAt < 1 && okSoFar) { okSoFar = false alert ("Please enter a valid email address.") email.focus() } var e1 = email.value var e2 = email2.value if (!(e1==e2) && okSoFar) { okSoFar = false alert ("Email addresses you entered do not match. Please re-enter.") email.focus() } if (thesubject.value=="" && okSoFar) { okSoFar=false alert("Please enter the subject.") thesubject.focus() } if (themessage.value=="" && okSoFar) { okSoFar=false alert("Please enter the details for your enquiry.") themessage.focus() } if (okSoFar==true) submit(); } } // --></script> <input type="button" class="button" value="Send" name="B1" ONCLICK="javascript:validateForm()"> <small><small> You must fill in the fields marked with a <font color="red">*</font></small></small> </td> </tr> </table> </center></div> </form> mailer.php <?php if(isset($_POST['submit'])) { echo 'hello world'; // database information $host = 'localhost'; $user = 'testdb'; $password = 'password'; $dbName = 'testdb'; // connect and select the database $conn = mysql_connect($host, $user, $password) or die(mysql_error()); $db = mysql_select_db($dbName, $conn) or die(mysql_error()); // Information for EMAIL $to = "[email protected]"; $subject = $_POST['EmailSubject']; $name_field = $_POST['SenderName']; $email_field = $_POST['SenderEmail']; $message = $_POST['ContactMessage']; $ip = $_SERVER['REMOTE_ADDR']; $datetime = date('l dS \of F Y h:i:s A'); $body = 'From: $name_field\n E-Mail: $email_field\n Date/Time: $datetune\n IP Address: $ip\n\n Message:\n $message'; // insert new entry into database $sql = 'insert into Contact (Contact_Name, Contact_Email, Contact_Date, Contact_IP, Contact_Subject, Contact_Message) values ('$name_field', '$email_field', '$datetime', '$ip', '$subject', '$message')'; $result = mysql_query($sql, $conn) or die(mysql_error()); echo 'Data has been submitted to site Administrator!'; mail($to, $subject, $body); } else { echo "Please try again!"; } ?> The DB connect is so that i can save a copy of the contact info in a db. If this is messign it up, I will take it out. I thank you for your help. Is there a mor efficient way to do this than I am doing?
-
im confused. I have an html file called contact.html that has my form in it. The form has an method of POST and action of contact.php. The contact.php has the code that i have posted above. Have i created my contact me wrong?
-
No, it just displays a blank screen. what could I be doing wrong? Is there a way for it to echo a message back to a "clean" contact.html page?
-
Okay, so i have created the following mailer.php page.... <?php if(isset($_POST['submit'])) { // database information $host = 'localhost'; $user = 'admin'; $password = 'password'; $dbName = 'newdb'; // connect and select the database $conn = mysql_connect($host, $user, $password) or die(mysql_error()); $db = mysql_select_db($dbName, $conn) or die(mysql_error()); // Information for EMAIL $to = "[email protected]"; $subject = $_POST['EmailSubject']; $name_field = $_POST['SenderName']; $email_field = $_POST['SenderEmail']; $message = $_POST['ContactMessage']; $ip = $_SERVER['REMOTE_ADDR']; $datetime = date('l dS \of F Y h:i:s A'); $body = 'From: $name_field\n E-Mail: $email_field\n Date/Time: $datetune\n IP Address: $ip\n\n Message:\n $message'; // insert new entry into database $sql = 'insert into Contact (Contact_Name, Contact_Email, Contact_Date, Contact_IP, Contact_Subject, Contact_Message)values ('$name_field', '$email_field', '$datetime', '$ip', '$subject', '$message')'; $result = mysql_query($sql, $conn) or die(mysql_error()); echo 'Data has been submitted to site Administrator!'; mail($to, $subject, $body); } else { echo "Please try again!"; } ?> Whenever I submit the following mailer.php i get no emails..... What am I doing wrong? I don't even get the 'Data has been submitted to site Administrator' or 'Please try again!'. Please someone help me.
-
Okay, so i have read the article that you reconmended.... that was very helpful. Thank you! The only thing I have a question is, in the $sql command how do i insert multiple value into multiple fields? <?php if(isset($_POST['submit'])) { // database information $host = 'localhost'; $user = 'admin'; $password = 'password'; $dbName = 'QWERTYTECH'; // connect and select the database $conn = mysql_connect($host, $user, $password) or die(mysql_error()); $db = mysql_select_db($dbName, $conn) or die(mysql_error()); // Information for EMAIL $to = "[email protected]"; $subject = $_POST['EmailSubject']; $name_field = $_POST['SenderName']; $email_field = $_POST['SenderEmail']; $message = $_POST['ContactMessage']; $ip = $_SERVER['REMOTE_ADDR']; $datetime = date('l dS \of F Y h:i:s A'); $body = "From: $name_field\n E-Mail: $email_field\n Date/Time: $datetune\n IP Address: $ip\n\n Message:\n $message"; echo "Data has been submitted to site Administrator!"; mail($to, $subject, $body); // insert new entry into database $sql = "insert into Contact (someField) values ('$newEntry')"; $result = mysql_query($sql, $conn) or die(mysql_error()); } else { echo "Please try again!"; } ?> Are there suppost to be () around the $sql data?
-
Just found this on the web. if (!empty($_SERVER['HTTP_USER_AGENT'])) { $HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT']; } else if (!empty($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) { $HTTP_USER_AGENT = $HTTP_SERVER_VARS['HTTP_USER_AGENT']; } else if (!isset($HTTP_USER_AGENT)) { $HTTP_USER_AGENT = ''; } if (ereg('Opera(/| )([0-9].[0-9]{1,2})', $HTTP_USER_AGENT, $log_version)) { $browser_version = $log_version[2]; $browser_agent = 'opera'; } else if (ereg('MSIE ([0-9].[0-9]{1,2})', $HTTP_USER_AGENT, $log_version)) { $browser_version = $log_version[1]; $browser_agent = 'ie'; } else if (ereg('OmniWeb/([0-9].[0-9]{1,2})', $HTTP_USER_AGENT, $log_version)) { $browser_version = $log_version[1]; $browser_agent = 'omniweb'; } else if (ereg('Netscape([0-9]{1})', $HTTP_USER_AGENT, $log_version)) { $browser_version = $log_version[1]; $browser_agent = 'netscape'; } else if (ereg('Mozilla/([0-9].[0-9]{1,2})', $HTTP_USER_AGENT, $log_version)) { $browser_version = $log_version[1]; $browser_agent = 'mozilla'; } else if (ereg('Konqueror/([0-9].[0-9]{1,2})', $HTTP_USER_AGENT, $log_version)) { $browser_version = $log_version[1]; $browser_agent = 'konqueror'; } else { $browser_version = 0; $browser_agent = 'other'; } echo '<HR WIDTH="100%" COLOR="black"/>'; print '<B>Browser Type:</B> ' . $browser_agent; echo '<BR />'; print '<B>Browser Version #:</B> ' . $browser_version; echo '<HR WIDTH="100%" COLOR="black"/><PRE><B>Full Details:</B> '; print_r( $HTTP_USER_AGENT ); echo '</PRE><HR WIDTH="100%" COLOR="black"/>'; Give all the credit to this site.....Site