Jump to content

Uploader Code


Chikwado
 Share

Recommended Posts

You can put PHP code wherever you want. The HTML doesn't really exist yet while the PHP code is running, but I recommend having the bulk of the PHP code at the top of the page. Even better would be to run all the PHP first and then send any data that needs to be displayed on the website to a template engine.

Link to comment
Share on other sites

Ok, You see while making upload file, we start with somethings like this:

<form action="upload.php" method="post" name=" ">
Is it possible to remove the following code as it is no more directing to another file?
action="upload.php"
? Edited by Chikwado
Link to comment
Share on other sites

Yes, you can remove it. When the action attribute is empty or missing, the form submits to the current page.

 

There is no name attribute on the form element, remove that as well.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...