Jump to content

QWERTYtech

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Everything posted by QWERTYtech

  1. 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?
  2. By any chance could u help me with the PHP validation instead of the JAVAscript? I would greatly appreciate it.
  3. they are both 'S' . Still nothing.
  4. 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?
  5. 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()">
  6. It was named B1 but I changed it to submit but nothing happened again.
  7. Nothing was stored in the DB and no the "hello world" did not show up.
  8. Well I changed to button to Submit type and tried it. I did not get anything in my mail.... hmmmm.... any other ideas?
  9. 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 = "admin@mydomain.net"; $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?
  10. 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?
  11. 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?
  12. 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 = "admin@mydomain.com"; $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.
  13. 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 = "admin@qwertytech.bounceme.net"; $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?
  14. 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
  15. Okay, I have created my Contact.php now and I have my Mailer.php file to do the mailing. I have a few questions about my Mailer.php now. <?php if(isset($_POST['submit'])) { $to = "admin@qwertytech.bounceme.net"; $subject = $_POST['EmailSubject']; $name_field = $_POST['SenderName']; $email_field = $_POST['SenderEmail']; $message = $_POST['ContactMessage']; $ip = @$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); } else { echo "Please try again!"; } ?> I was wanting to know if the $ip and $datetime is coded right.... Also, what code would I have to add to put a copy of this Contact form to a database????
  16. Hey everyone. Just want to say this is a great site. Anywayz, I am really new to PHP and I need some help figuring things out. I have not written anything in PHP before so I have no code to show. Im sorry . My page is coded in XHMTL and I am using MySQL for my database. The first thing I need to create is a Registration page that will allow visitors to create login names. I want the PHP page to check the db whenever the user puts in a Username to make sure its not already being used. The information I want to collect is Username, Password, Nickname/Realname, the <image verification>, etc. After submitting the info to the db I want it to email them a confrimation to their email address that they have to click on to fully register. Secondly, I want to add a <script> to every page that checks to see if the user is logged in and if so it shows their Username and Profile options. If they are not logged in then it will show a Login & Register links. Lastly, I want to create a Contact Me page that allows anyone to submit some information and then that information is emailed to me. I also want it to be saved in a db. I know this is alot and I wish I knew some basic coding so that I could show you what I have done/want. I know what I want to do in my head but i just don't know how to code it. Thanks for any help!!!! QWERTYtech
  17. How could I create a Dropdown menu that has the Basic TimeZones in it??????
  18. Quick update... On my contact page I also want it to save a copy to a db. Sorry!
  19. Hey everyone. Just want to say this is a great site. Anywayz, I am really new to PHP and I need some help figuring things out. I have not written anything in PHP before so I have no code to show. Im sorry . My page is coded in XHMTL and I am using MySQL for my database. The first thing I need to create is a Registration page that will allow visitors to create login names. I want the PHP page to check the db whenever the user puts in a Username to make sure its not already being used. The information I want to collect is Username, Password, Nickname/Realname, the <image verification>, etc. After submitting the info to the db I want it to email them a confrimation to their email address that they have to click on to fully register. Secondly, I want to add a <script> to every page that checks to see if the user is logged in and if so it shows their Username and Profile options. If they are not logged in then it will show a Login & Register links. Lastly, I want to create a Contact Me page that allows anyone to submit some information and then that information is emailed to me. I know this is alot and I wish I knew some basic coding so that I could show you what I have done/want. I know what I want to do in my head but i just don't know how to code it. Thanks for any help!!!! [move]QWERTYtech[/move]
  20. Okay, I have a page I'm working on in PHP and I need a simpler way to autopopulate a dropdown menu. I have dropdown list that i need the numbers 00 to 59 populated without having to hand code it. Can I do this?
  21. Can anyone give me a good site for reference if I'm wanting to create my own shopping cart?
  22. [move]I have a problem.[/move] I need to write a small PHP application that will allow a user to fill out an Car Club Application online. I have pretty much made the layout of the contact form which is found here. I am collecting the following information: General Information Name <text> Email <text> Phone <text> Address <text> City <text> State <select option> ZIP <text> Preferred Contact Method Vehicle Information Make <text> Model <text> Year <select option> Modifications <text box> Pictures (max upload of ten) <text> Membership Agreement I want to make a scrollable textbox with the Membership agreement in it but to where it cannot be change. I want an Agree & Disagree radio button. I was thinking that when the Applicant pressed the submit button, it would create a folder with their name as its title and upload all the pics selected into the folder. Can this be done? Secondly, I want this to be emailed to the club president but also saved in my MySQL database. Can this be done? Could someone please help me?
  23. Thats what I need, tutorials that is. I'm completely new to PHP and I need help coding everything. If you have any good references, I would greatly appreciate it. QWERTYtech
×
×
  • 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.