Jump to content

form actiorn=xxx.php problems

- - - - -

  • Please log in to reply
4 replies to this topic

#1
Pedro Amorim

Pedro Amorim

    Newbie

  • Members
  • Pip
  • 4 posts
Hy

First of all, nice forum you have, I hope to come back a lot to help/be helped in this comunity :P

I'm here to ask for your help in my php form's, how can I do something like this :

<form id='log'  method="post" enctype="multipart/form-data" action="uploads/uploadform.php">


And after the action done, I have to make "return" in the browser, because it just prints a message "success" or "insuccess" :s

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
Do you mean to say that, you wish to upload with the form, and have the browser display success or unsuccess when uploaded?
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
Pedro Amorim

Pedro Amorim

    Newbie

  • Members
  • Pip
  • 4 posts

Alexander said:

Do you mean to say that, you wish to upload with the form, and have the browser display success or unsuccess when uploaded?

The problem is that the browser opens a all new page with just the message, I want it just to print the message in the same page or, print the message and get back to the page

#4
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
You likely can upload the data to the form (upload_form.php) and use a meta refresh tag to redirect the user to the previous page after a set amount of time, after they see the message, or simply redirect them back to the page, although with ?success=true or similar appended. If you wish to do this all on the same page however, you could simply handle the upload on the same page (POST to itself) or use AJAX so there is not a need for reloading.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#5
yassinebelkaid

yassinebelkaid

    Newbie

  • Members
  • PipPip
  • 20 posts
You can either put all together in one page, or you will have to put a redirection header in your upload_form.php page.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users