Jump to content

form post help


imarockstar

Recommended Posts

I have this little bit of code, its a form to upload an image.

 

<form name="upload-form" id="upload-form" method="post" action="javascript:ajaxFunction('scripts/image_go.php')" enctype="multipart/form-data"> 
<input type="hidden" name="MAX_FILE_SIZE" value="1000000"> 


Image Name <input class=logoname  name="imagename" type="text" id="logoname" />
<input  name="file" type="file" id="file" /> <br>
<input class=submit tabindex="2" accesskey="l" type="submit" name="cmdupload" value="Upload" /> 

</form>

 

 

this is my problem .. you can see that the action is a javascript ... the script that i am calling is not accepting the post because it thinks that the SUBMIT button was not pushed and its kicking me back to the form ... if I use that JS as the action link will the post variables still go through to my script ?

 

thanks

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/132607-form-post-help/
Share on other sites

<form name="upload-form" id="upload-form" method="post" action="" onsubmit="javascript:ajaxFunction('scripts/image_go.php')"enctype="multipart/form-data">

 

Not sure if that will work, but I would guess it is because your php script is checking for whether the submit button was pressed with isset...

 

Give it a go

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/132607-form-post-help/#findComment-689561
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.