Nazwa29 Posted November 4, 2013 Share Posted November 4, 2013 Basically I want to make very simple .php website success.php When person is redirected they have to input email address then (60char) code shows up they can copy it and a copy is sent to thier email address and my email address Link to comment https://forums.phpfreaks.com/topic/283591-please-help/ Share on other sites More sharing options...
.josh Posted November 4, 2013 Share Posted November 4, 2013 Well good luck with that. Feel free to post any specific questions if you get stuck somewhere. Link to comment https://forums.phpfreaks.com/topic/283591-please-help/#findComment-1456921 Share on other sites More sharing options...
Nazwa29 Posted November 4, 2013 Author Share Posted November 4, 2013 This if what I have now <?phpfunction sernum(){ $template = 'XX99-XX99-99XX-99XX-XXXX-99XX'; $k = strlen($template); $sernum = ''; for ($i=0; $i<$k; $i++) { switch($template[$i]) { case 'X': $sernum .= chr(rand(65,90)); break; case '9': $sernum .= rand(0,9); break; case '-': $sernum .= '-'; break; } } return $sernum;} /** * try it */echo '<pre>';for ($i=0; $i < 1; $i++) echo sernum(), '<br/>';echo '</pre>';?> And i want the code to be sent of to my email and person that inputs email in text box Link to comment https://forums.phpfreaks.com/topic/283591-please-help/#findComment-1456923 Share on other sites More sharing options...
.josh Posted November 4, 2013 Share Posted November 4, 2013 Well good luck with that. Feel free to post any specific questions if you get stuck somewhere. Link to comment https://forums.phpfreaks.com/topic/283591-please-help/#findComment-1456926 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.