HTML - Register Login Page Needs Autorespond Click To Verify Email
I have a register and login page and would like to add an autoresponse email. The end result being when people register they have to click a link in their email before being able to login. Essentially to stop fake email addresses being used. All the coding works well but I'm having trouble adding the autoresponder part. The current code is below. Can anyone help? I'll buy you all kinds of cakes and fizzy pop if you can. :-D
<?PHP ob_start(); //Connect to enter the information into the fields $link = mysql_connect('localhost','bangers', 'andmashme') or die("Could not connect"); mysql_select_db('bangers') or die("Could not select database"); //Todays date $date = time(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>BANGERS AND MASH: VIEW PICS LOGIN</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"> <link href="III.css" rel="stylesheet" type="text/css"> </head> <body ><center> <body bgcolor="white"> <img src="banner.png" width="597" height="159" border="0"> <!-- ----------------------------------------------PALN A PARTY--------------------------------------------------------------------------------------> <div class="leftcontent"> <div class="leftTop">.</div> <p class="boxtext"> <font color="black"><font face="Courier New"> <b>Welcome to the weekly updated... <br> BANGERS AND MASH GALLERY!</b> <br> Take a moment to register, & Existing users proceed to the enter gallery section</p> <p class="boxtext"> <font color="black"> <div class="leftbottom"></div> <div id="clear"></div> <div class="leftTop"></div> <? if ($type == 'login') { //LOG IN AREA $sql_check = mysql_query("SELECT * FROM `gallerytable` WHERE 1 AND `email` LIKE '$email2' LIMIT 0 , 30") or die ("Unable to get results."); $auth_list = mysql_fetch_array($sql_check); function CheckEmail($Email = "") { if (ereg("[[:alnum:]]+@[[:alnum:]]+\.[[:alnum:]]+", $Email)) { return true; } else { return false; } } if (mysql_num_rows($sql_check) > 0 && CheckEmail($email2)) { $email = $auth_list['email']; $cookie_data = $email.':'.$date; setcookie('galleryid', $cookie_data, time()+1118640); echo ' <p align="right" class="boxtext"> <h2>PLEASE WAIT....</h2> </p>'; echo "<meta http-equiv=\"Refresh\" content=\"0; url=gallery2.php?contentfolder=". date("Y") ."\">"; } else { echo ' <p align="centre" class="boxtext" font color="black"> <h2>FAILED</h2> <h2>This email has not been registered with us. <br>Please go back and register in order to view the gallery.</h2> <a href="javascript:history.go(-1)"><img src="back.jpg" width="104" height="41" border="0"></a> </p>'; } } else if ($type == 'register') { // CHECK EMAIL FUNCTION //*********************** function check_email_mx($email) { if( (preg_match('/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/', $email)) || (preg_match('/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/',$email)) ) { $host = explode('@', $email); if(checkdnsrr($host[1].'.', 'MX') ) return true; if(checkdnsrr($host[1].'.', 'A') ) return true; if(checkdnsrr($host[1].'.', 'CNAME') ) return true; } return false; } // Check if its in there $result=mysql_query("SELECT * FROM `gallerytable` WHERE `email` = '$email'"); // IF email is ok if (!check_email_mx($email)) { echo ' <p align="right" class="boxtext" font color="black"> <h2>EMAIL ERROR</h2> <h2>You have entered an incorrect email. <br> Please click the button below to go back and try again.</h2> <a href="javascript:history.go(-1)"><img src="back.gif" width="104" height="41" border="0"></a> </p>'; } elseif (mysql_num_rows($result) <= 0) { //Puts deatils into the bangers database $insert=mysql_query("INSERT INTO `gallerytable` (`id`, `fname`, `sname`, `email`, `telno`, `date`) VALUES ('', '$f_name', '$s_name', '$email', '$mobile', '$date')")or die('couldn\'t Insert record into bangers database :'.mysql_error()); echo ' <p align="right" class="boxtext" font color="black"> <h2>THANK YOU FOR REGISTERING!!</h2> <h2>Your details have been registered with us and will not <br>o the login section to view images.</h2> <a href="javascript:history.go(-1)"><img src="back.gif" width="104" height="41" border="0"></a> </p>'; } else { echo ' <p align="right" class="boxtext" font color="black"> <h2>REGISTERED</h2> <h2>YOUR DETAILS HAVE ALREADY BEEN REGISTERED WITH US. PLEASE PROCEED TO THE ENTER GALLERY SECTION.</h2> <a href="javascript:history.go(-1)"><img src="back.jpg" width="104" height="41" border="0"></a> </p>'; } } else { echo ' <table width="800" boder="0" align="center"> <table width="600" border="0" align="center"> <tr> <td valign="middle" colspan="2" align="center"><p><img src="register.gif" width="227" height="26" /></p> </td> <td valign="center" colspan="2" align="center"><img src="entergallery.gif" width="227" height="24" /> </td> <td> </td> <tr> <td width="300" valign="middle"> <p><strong><img src="required1.gif" width="227" height="31" /></strong></p> </td> <td width="300" valign="middle">  </td> <td width="300" valign="middle"> <form name="login" method="post" action="'.$_SERVER['PHP_SELF'].'"> <img src="email1.gif" width="227" height="24" /> <td width="300" valign="middle"> <input name="email2" type="text" size="16" class="Field" /> </td> <tr> <td> </td> <td> </td> <td> </td> <td width="300" valign="middle"> <input name="type" type="hidden" value="login"/> <input name="Submit" type="image" class="submit" value="Submit" src="submit.gif" align="right"> </form> </td> <tr> <td width="300" valign="middle"> <form name="register" method="post" action="'.$_SERVER['PHP_SELF'].'"> <p><img src="name1.gif" width="227" height="27"/> <td width="300" valign="middle"> <input name="f_name" type="text" class="Field" id="f_name" size="16"/> <tr> <td width="300" valign="middle"> <p><img src="surname1.gif" width="227" height="28" /> <td width="300" valign="middle"> <input name="s_name" type="text" class="Field" id="s_name" size="16"/> <tr> <td width="300" valign="middle"> <p><img src="email1.gif" width="227" height="24" /> <td width="300" valign="middle"> <input name="email" type="text" size="16" class="Field" /> <tr> <td width="300" valign="middle"> <p><img src="emailconfirm1.gif" width="227" height="25" /> <td width="300" valign="middle"> <input name="confemail" type="text" size="16" class="Field" /> <tr> <td width="300" valign="middle"> <p><img src="mobile1.gif" width="227" height="22" /> <td width="300" valign="middle"> <input name="mobile" type="text" size="16" class="Field" /> </td> <tr> <td width="300" valign="middle"></td> <td width="300" valign="middle"> <input name="type" type="hidden" value="register"/> <input name="Submit" type="image" class="submit" value="Submit" src="submit.gif" align="right"> </p> </form> <br/></td> <td width="5"/> </form> </td> </tr> </table> '; } ?> </p> <div class="leftbottom"></div> </div> <!--END NEWS --> </div> </div> </body> </html> Similar Tutorialsi have one blog www.andhratalkies.co.nr i want to put Register and login buttions with text boxes(signup and signin) and it should be work can any one give me the code and instruct me. plzzz it's urgent thanks MO Hello guys, I was wondering if anyone is aware of a script that does this: You have an image on your website. When you click on the image a box should appear where you can insert your email and send the photo to your email. Anyone aware of something like that? Thanks a lot! Why is my home page crashed every time i click the next page button at the very bottom if you look at the (FEATURED and NEWS categories) it will changes after you clicked the next page bottom Also when i click the next page bottom its not showing the right articles/posts according to the date wrote. any help of how i can fix this problem step by step will be much appreciated. Right now, once I upload a webpage designed with Netscape composer 7.2 (since it is free) and my own html code inserted occasionally, I verify it looks correct on the following web browsers: IE 8 (32 bit) Firefox Chrome Safari Opera Should I verify it on others, such as IE 7 or IE 6, or is that a waste of time? From my experience, Chrome, Firefox, and Safari usually get it right, and IE 8 and Opera get it right less of the time. How do you verify your website on smart phones and whatever browser they use (Black Berry, iPhone, Palm, Android) without having to buy each one? What about the iPad? Thanks! What ActiveX element is on this webpage? Everytime I load it in Internet Explorer a pop up comes up saying "click here to run an ActiveX on this web page"... Any ideas? http://www.curiousclothing.com/test/ Hey all, i'm new to the forum so let me know if i've posted in the wrong place! I'm looking for a script to listen out for clicks on the page, even if the page contains an iframe. So no matter where the user clicks on the page (even if its a link within an iframe) I can direct them to a specific page. If its easier to make it specific to iframes only, that would also do. I hope i've been clear enough! - TM Hi... I got a question tht puzzeled me whole day and i dont know how to solve,Can you please help me? My main page is at /usr/local/share/HT/html/server/index.html. Now that inside my main page i want to do a link by a button click to the another page, say page 8. page 8 is at /data/website. But whenever i tyr to click on tht button, it says "PAge not found" Followimng is my coding <br><input type="submit" value=" Viewing " onClick="location.href='/data/websites/page8.html'"; onMouseOver="info('Viewing'); return true" onMouseOut="info(' '); return true" ></br> Can anyone guides me step-bystep, please :-) I can't figure out how to script an image so that it slides to another area on the page when clicked on. For example, a logo that appears in the center of a blank page (vertical-align: middle), but when clicked slides smoothly to the top (vertical-align: top). Alternatively, it could be that clicking the image changes the vertical-align property of the entire table or cell. Either way, I can't figure out how to do this with a smooth animation. A fantastic example of this--where I got the idea, in fact--is the front page of tumblr.com, where clicking "Log in" smoothly slides the tumblr logo from the top of the page to the center. How is this done? I'm sorry if the solution is mind-bogglingly simple, I'm kind of a noob. But I've racked the web and I can't seem to find a script that does this. Can somebody please help? Thanks so much. In a webpage, I have a link to a photo: <a target="_blank" href="myURL"> where myURL just points to a jpg image. When the jpg is presented, I'd like right clicks to be disabled. Is there a way to do this? I don't want right clicks disabled on the main page, just the target jpg. Thanks in advance for any help. Hi there, you might remember me from this thread. (which was resolved by Mandarin, thanks you!) Now Im back with another, kind of the same thing: "Click -> Locate page -> & then slide down?" Allow me to explain: So ive got this header.php right. And the header file is included at every page. All the links in the header.. link to 1 file. (diensten.php) BUT, each link links to different areas within that file... So what I would like to achieve is that when a link in the header is clicked, it slides down to the correct page-area. Porblem is.... after clicked, is doesnt even go the right page. I think the smooth slider jquery-plugin is interfering someway. I already laid down the groundwork inside the header. Please have a look here. Would my wish be possible? Or should I just lay it to rest? Thanks. Sorry, my title is unclear see if I can explain it better he ok when I click from any of the other pages to the menu page, the name and address (which is on every page in the same place) moves to the left slightly. the name and address stay in the same place when clicking to and from any of the other pages, its just the menu page with this hiccup. This happens both in IE and Firefox. Any ideas on how to correct this?? HTML of home page: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="EN-GB"> <meta name="author" content="xxxxxxx"> <meta name="description" content="Kabasa Guest House and Restaurant - Online"> <meta name="copyright" content="2011"> <meta name="keywords" content="Kabasa Guest House and Restaurant, Places to stay in Kenya, Accomdation in Kenya"> <title>Kabasa Guest House and Restaurant</title> <link rel="stylesheet" type="text/css" href="styles6.css"> </head> <body> <ul id="navbar"> <li><a href="home.html">HOME</a></li> <li><a href="menu.html">MENU</a></li> <li><a href="room.html">ROOMS</a></li> <li><a href="rates.html">RATES</a></li> <li><a href="book.html">BOOK</a></li> </ul> <div id="header"> <h1>Kabasa Guest House and Restaurant</h1> <div id="address"> <pre> xxxxxxxx xxxxxxx xxxxxxxxx Tel: +00000000000 </pre> </div> </div> <br> <p class="center"> The Kabasa guest house and restaurant is situated just a<br> few metres from the worlds second largest fresh water<br> Lake Victoria. We welcome you to come and experience our<br> accommodation with excellent service at affordable rates.<br> </p> <br> <img src="Images/d4.jpg" class="center"/> <br> <div id="footer"> <p>Copyright 2011 © Kabasa Guest House and Restaurant. All rights reserved</p> </div> </body> </html> HTNL of the menu page: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="EN-GB"> <meta name="author" content="xxxxxx"> <meta name="description" content="Kabasa Guest House and Restaurant - Online"> <meta name="copyright" content="2011"> <meta name="keywords" content="Kabasa Guest House and Restaurant, Places to stay in Kenya, Accomdation in Kenya"> <title>Kabasa Guest House and Restaurant</title> <link rel="stylesheet" type="text/css" href="styles6.css"> </head> <body> <ul id="navbar"> <li><a href="home.html">HOME</a></li> <li><a href="menu.html">MENU</a></li> <li><a href="room.html">ROOMS</a></li> <li><a href="rates.html">RATES</a></li> <li><a href="book.html">BOOK</a></li> </ul> <div id="header"> <h1>Kabasa Guest House and Restaurant</h1> <div id="address"> <pre> xxxxxxxxxx xxxxxxxx xxxxxxxxx Tel: +0000000000 </pre> </div> </div> <h2>Menu</h2> <div id="menucenter"><b>We offer a full continental buffet breakfast table service by order.</b> <b>We also offer room service.</b></div> <div id="menu"> <pre> <u>Full Breakfast</u> Our full breakfast gives you a choice of the following: Fruits : Pineapple, Watermelon, Sweet Banana, Pawpaw, Oranges Fresh Juice : Passion, Mango, ****tail Cereal : Weetabix or Corn flakes served with cold or warm milk Toast, sausages, eggs and bacon <u>Beverages</u> Drinking chocolate, Tea, Nescafe, Milo <u>Snacks</u> Sandwiches (by order), chips, sausages, beef rolls, samosas (chicken, beef and vegetables), meat pie, cakes. <u>Main meals/courses</u> Chicken Curry, Chicken Masala, chicken stew, butter chicken, boiled chicken, chicken biriani, chicken wet fry. All served with Rice, ugali, chapatti, pasta, spaghetti and vegetables with garnishing Beef Stroganoff, beef stew, beef curry, fried beef, boiled beef, beef masala Whole (stewed or fried) tilapia, Fish fillet in coconut source, Fresh (stewed Tilapia), Whole (masala) Tilapia All Served with rice, ugali, chapatti and vegetable garnishing <u>Soups</u> Vegetable cream, Tomato cream, French onion soup, Served with Crotons. Traditional Kenyan Vegetables served with Ugali, Rice, Mash Potatoe, Boiled Potatoes, Baked Potatoes and fried vegetable rice <u>Salads</u> Kachumbari, we also have a number of assorted fruits and vegetable salads. <u>Burgers</u> Cheese beef burgers, Egg beef burgers, Beef burgers <u>Choma Zone</u> T-bone steak (400gms), pork chops, barbeque chicken, prime fillet steak <u>Beers</u> Tusker, White Cap (Tusker Malt), Guinness, Smirnoff ice (black and red) <u>Juices</u> Soda, Alvaro, Novida, Mineral water, Passion, Avocado </pre> </div> <div id="footer"> <p>Copyright 2011 © Kabasa Guest House and Restaurant. All rights reserved</p> </div> </body> </html> CSS: Code: body { margin:2% 4%; font-family:'lucida grande',tahoma,helvetica,sans-serif; font-size:11pt; color:#006; background:#ffc; } #navbar { float:left; width:12%; margin:0; padding:0; font-size:20px; list-style-type:none; } #navbar li { margin-bottom:2px; } #navbar a { display:block; padding-left:8px; background-color:#cff; } #navbar a:hover { color:#000; background-color:#fff; } #header { margin-left:%; } h1 { text-align:center; margin-right: 10%; } #address { width:182px; padding:0 4px; margin: auto; font-family:arial,sans-serif; font-size:10pt; font-weight: bold; background-color:#fff; filter:alpha(opacity=75); opacity: 0.75; } h2 { clear:both; margin-top:3%; margin-left:%; text-align:center; } h3 { clear:both; margin-top:3%; margin-left:%; text-align:center; } h6 { margin: auto; left:0; right:0; width: 655px; font-weight: bold; font-size: 10pt; font-family: arial, sans-serif; } #rates { padding:8px; background-color:#fff; filter:alpha(opacity=75); opacity: 0.75; } #rates span { text-decoration:underline; font-weight:bolder; } #menu { margin: auto; left:0; right:0; width: 675px; background-color:#fff; filter:alpha(opacity=75); opacity: 0.75; } #menucenter { text-align: center; } p.center { text-align: center; } img.center { margin-left: auto; margin-right: auto; display: block; } #footer { clear: both; width: 100%; font-family: Arial Unicode MS; font-size: 8pt; text-align: center; } Many thanks Jackie I'm really stuck on this one. So, I'm on a page, let's call it index1 and I need to open index2 with index3 displayed in a frame on index2 (All from just clicking one link). The problem is on index1 there are many links that will all take us to index2, but with different pages (index4, index5 etc.) needing to be displayed in the frame on index2. How can I achieve this? Hi i work for a web design company and im new to dreamweaver and html My client needs me to create a main landing page for his site and it will say click here to enter and when i click here to enter it will require a user name and password to get into the site, how do i do that? Hi, I have the following situation. I want when the user types http://locahost/abc.html or http://locahost/xyz.html he should be automatically redirected to the http://locahost/login.html page User can only access http://locahost/xyz.html page when he clicks a link on http://locahost/abc.html and not by directlty typing it in the browser. By this i want only authorized users to have access to my web pages. My web portal is hosted on apache server on linux OS. How can i do this? Any help would be greatly appreciated. i'm using 6 iframes in a page my page has scrolling whlie i click a link on top most iframe the page has been slide down the scroll bar comes to middle plz help me Ladies and gentlemen, I'm just a beginner to HTML. I'm trying to develop my own web page but there is still lots of things under construction. Now just the home page and some of hyperlinks are finished and available. Most of other hyperlinks are unavailable and under construction, that's why when I click over these unavail. hyperlink, the browser always tell me "the page can not be displayed"... My idea is that I would like to know how to displayed a specific page which has the message "Sorry, this page is currently under construction". So everytime I cick over any link that is unavailable, it will show me this particular page with the message on... Does anynbody know how to do this, could you please advise me how to write code to get this done. Please help me, your help is highly appreciated... Many thanks & best regards, Hao. If i make a login page in html like HTML Code: <html> <head> <title>Test Box</title> </head> <body> <br> <input text maxlength="15" onfocus="this.value=''" type="text" value="User name"> <input text maxlength="20"onfocus="this.value=''" type="password" value="Password"> <button disabled>Login</button> </body> </hmtl> Then how to i do it so when they enter there username and password the login button is active. I dont know where to post this and i searched and couldnt find it but can anyone help me.. im creating a webpage using dreamweaver cs3 and i need to password protect a page, using a username and password, can this be done any other way besides php? If so how can i do it? I am working on my school's website and one of the teachers would like a page that she can log into and post assignments and what not. I figured this wouuld be easy, but the server does not support PHP, which means no SQL either. How should I go about making this page with straight html? I'm a professional photographer, I taught myself how to design websites in the beginning of 07. While my site www.8aphotography.com may be basic it has a look that I enjoy. My question is how can I get a simple way for my clients to login to a private gallery. I searched Google and so forth but came across nothing that showed how to do it. I'm looking to be able to give my clients a user name and password that they could type in to view their photographs. Anyones help would be greatly appreciated. Philip |