php - Form Submission Error on Wordpress Innerpage -


i have form on inside template of wordpress.

<?php /* template name: template form submission */  get_header(); ?> <div class="entry-content"> <div style="width: 1000px;" align="left"> <form enctype="multipart/form-data" name="file_uplaod" action="<?php echo $_server['php_self']; ?>" method="post"> <input type="text" name="name" id="name" /><br /><br /> <input type="text" name="email" id="email" /><br /><br /> file <input type="file" name="test_file" id="test_file"/><br /><br /> <input type="submit"> </form>  </div> 

but problem php-self not working after form submission , going index.php page. unable use javascript redirect file upload here. can me solve it.

<?php function curpageurl() {  $pageurl = 'http';  if ($_server["https"] == "on") {$pageurl .= "s";}  $pageurl .= "://";  if ($_server["server_port"] != "80") {   $pageurl .= $_server["server_name"].":".$_server["server_port"].$_server["request_uri"];  } else {   $pageurl .= $_server["server_name"].$_server["request_uri"];  }  return $pageurl; } ?> 

then replace

 <form enctype="multipart/form-data" name="file_uplaod" action="<?php echo $_server['php_self']; ?>" method="post"> 

with

<form enctype="multipart/form-data" name="resume_uplaod" action="<?php echo curpageurl(); ?>" method="post"> 

see http://dev.kanngard.net/permalinks/id_20050507183447.html


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -