lovephp Posted October 19, 2012 Share Posted October 19, 2012 guys what is wrong here that its not submiting? <?php if(isset($_POST['submit'])){ $number = $_POST['number']; $msg = $_POST['msg']; print_r($_POST); $counter = 0; $start = 1; for($start; $start < 30; $start++) { $username="0000000000"; //replace the mobile number with your ultoo id $password="00000"; //replace the password with your Ultoo password $recipitant="{$number}"; $message=urlencode("{$msg}"); $agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://ultoo.com/login.php"); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*")); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt( $ch, CURLOPT_AUTOREFERER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, "LoginMobile=$username&LoginPassword=$password&RememberMe=1 &submit2=LOGIN HERE"); $html=curl_exec($ch); curl_setopt($ch, CURLOPT_URL,"http://ultoo.com/home.php"); curl_setopt($ch, CURLOPT_USERAGENT, $agent); //curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_POSTFIELDS, "MessageLength=140 &MobileNos=$recipitant&Message=$message&SendNow=Send Now"); $html = curl_exec($ch); if(!strstr($html,"successfully...")) { $cont=""; echo $cont; } else { $cont=" ".$recipitant; echo $cont; } $counter = $counter + 1; print "Message Send"; } } ?> <!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> <title>Send Free SMS</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> *{ margin: 0px; padding:0px; } body { background-color: #DBE8F9; font: 11px/24px "Lucida Grande", "Trebuchet MS", Arial, Helvetica, sans-serif; color: #5A698B; padding: 0px; } #title { width: 330px; height: 26px; color: #5A698B; font: bold 11px/18px "Lucida Grande", "Trebuchet MS", Arial, Helvetica, sans-serif; padding-top: 5px; background: transparent url("bg_legend.gif") no-repeat; text-transform: uppercase; letter-spacing: 2px; text-align: center; } form { width: 335px; } .col1 { text-align: right; width: 135px; height: 31px; margin: 0; float: left; margin-right: 2px; background: url(bg_label.gif) no-repeat; } .col2 { width: 195px; height: 31px; display: block; float: left; margin: 0; background: url(bg_textfield.gif) no-repeat; } .col2comment { width: 195px; height: 98px; margin: 0; display: block; float: left; background: url(bg_textarea.gif) no-repeat; } .col1comment { text-align: right; width: 135px; height: 98px; float: left; display: block; margin-right: 2px; background: url(bg_label_comment.gif) no-repeat; } div.row { clear: both; width: 335px; } .submit { height: 29px; width: 330px; background: url(bg_submit.gif) no-repeat; padding-top: 5px; clear: both; } .input { background-color: #fff; font: 11px/14px "Lucida Grande", "Trebuchet MS", Arial, Helvetica, sans-serif; color: #5A698B; margin: 4px 0 5px 8px; padding: 1px; border: 1px solid #8595B2; } .textarea { border: 1px solid #8595B2; background-color: #fff; font: 11px/14px "Lucida Grande", "Trebuchet MS", Arial, Helvetica, sans-serif; color: #5A698B; margin: 4px 0 5px 8px; } </style> </head> <body> <form action="index.php" name="sms" method="post"> <div id="title">Send Free Sms</div> <div class="row"><label class="col1">10 Digits Number: </label> <span class="col2"><input name="number" class="input" type="text" id="number" size="20" tabindex="1" /></span> </div> <div class="row"><label class="col1comment">SMS Message: </label> <span class="col2comment"><textarea cols="20" class="textarea" rows="4" name="msg" id="msg" tabindex="2" ></textarea></span> </div> <div align="center" class="submit"><input type="submit" value="send" width="52" height="19" border="0" /> </div> </form> </body> </html> Link to comment https://forums.phpfreaks.com/topic/269685-form-submit-not-working/ Share on other sites More sharing options...
akphidelt2007 Posted October 19, 2012 Share Posted October 19, 2012 Could be wrong, but seems you do not have a name for the submit input. Put in name='submit' and it should work. Link to comment https://forums.phpfreaks.com/topic/269685-form-submit-not-working/#findComment-1386378 Share on other sites More sharing options...
lovephp Posted October 19, 2012 Author Share Posted October 19, 2012 oops one simple thing i missed hehehe yeah it works now cheers Link to comment https://forums.phpfreaks.com/topic/269685-form-submit-not-working/#findComment-1386379 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.