php - 403 Forbidden on form submission -
i have url returns 403 forbidden unknown reason. have disable mod_security in .htaccess, chmodded file 0777. url
http://www.veepiz.com/afrostar.php?app=help&func=addvideo
it happens when u submit form ideas?
here code
function publicaddvideo() { if (isset($_post['submit_addvideo'])) { require_once("class.phpmailer.php"); //send email tobirthday person $subject="new afrostar video suggested"; $msg = "dear jordah,\n". "youtube video: ".$_post['youtubesle']."\n star name: ".$_post['starnamesle']."\n country: ".$_post['countrysle']."\n ip address: ".getrealipaddr(); $mail = new phpmailer(); $mail->issmtp(); // set mailer use smtp $mail->host = "localhost"; // specify main , backup server $mail->smtpauth = true; // turn on smtp authentication $mail->username = "support@veepiz.com"; // smtp username $mail->password = "********"; // smtp password $mail->from = "support@veepiz.com"; $mail->fromname = "veepiz"; $mail->addaddress('jordahz@hotmail.com',"jordah ferguson"); $mail->addreplyto("support@veepiz.com", "veepiz"); $mail->wordwrap = 50; // set word wrap 50 characters $mail->ishtml(true); // set email format html $mail->subject = $subject; $mail->body = nl2br($msg); $mail->altbody = $msg; if(!$mail->send()) { } ?> <div style='color:green;'>admins @ veepiz.com have been notified of request , update afrostar application accordingly.<div align='center' style='padding:10px'> <a href='afrostar.php' onclick="return getpage('afrostar_class.php',{});" class='btn'>back afrostars</a></div></div> <?php } else { $this->displayheader("add african video"); ?> <script language="javascript"> var checkhelpvars=function () { err=''; if ($('#starnamesle').val().length==0) err+="please type in name of star"; if ($('#countrysle').val().length==0) err+="\nname of country missing"; if ($('#youtubesle').val().length==0) err+="\nyoutube url missing"; var url=$('#youtubesle').val(); var matches = url.match(/^http:\/\/(?:www\.)?youtube.com\/watch\?(?=.*v=[\w-]+)(?:\s+)?$/); if (matches) { } else { err +="\ninvalid youtube url"; } if (err.length>0) { alert(err); return false; } <?php if (isloggedin()) { echo "return postpage('afrostar_class.php?app=help&func=addvideo',{starnamesle:$('#starnamesle').val(),countrysle:$('#countrysle').val(),youtubesle:encodeuri($('#youtubesle').val()),submit_addvideo:1});"; } else { echo "return true;"; } ?> } </script> <form id='helpform' method="post" action="http://www.veepiz.com/afrostar.php?app=help&func=addvideo"> <table cellpadding="2" cellspacing="3"> <tr> <td><b>africa artist name:</b></td> <td><input id='starnamesle' type="text" style='' name='starnamesle' style='-webkit-border-radius: 8px;-moz-border-radius: 8px;border-radius: 8px;width:450px'/></td> </tr> <tr> <td><b>country:</b></td> <td><input id='countrysle' type="text" style='' name='countrysle' style='-webkit-border-radius: 8px;-moz-border-radius: 8px;border-radius: 8px;width:450'/></td> </tr> <tr> <td><b>youtube link:</b></td> <td><input id='youtubesle' type="text" style='' name='countrysle' style='-webkit-border-radius: 8px;-moz-border-radius: 8px;border-radius: 8px;width:450'/><br/>example:<small style='font-size:8pt;color:#666666'>http://www.youtube.com/watch?v=vjyftjmod2w</small></td> </tr> <tr> <td colspan="2" align="center"><input type="submit" class="btn" onclick="return checkhelpvars();" name='submit_addvideo' value="finish"></td> </tr> </table> </form> <?php $this->displayfooter(); } }
check post data, if contains url there chances blocked in server.
you should replace characters in url submitting need convert original form on post.
Comments
Post a Comment