View previous topic :: View next topic |
Author |
Message |
obener -
Joined: 11 Jan 2008 Posts: 10
|
Posted: Sun Jan 20, 2008 3:30 pm Post subject: Integrating interactive buttons with php |
|
|
Hi all,
I wanted to know if interactive buttons could be used as submit buttons in php? the only problem im having at the moment is that im designing using microsoft frontpage and they have interactive buttons which i think looks nicer than submit buttons. When i look at the code for it, i cant find the button name. Could someone try it and tell me if it is possible to use interactive buttons as submit buttons?
Thanks |
|
Back to top |
|
 |
pkSML -
Joined: 29 May 2006 Posts: 955 Location: Michigan, USA
|
Posted: Sun Jan 20, 2008 10:59 pm Post subject: |
|
|
What do you mean by interactive buttons?
Do you mean they change when you hover over the submit button or when the submit button is pressed (like MySpace or FaceBook)? _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
 |
obener -
Joined: 11 Jan 2008 Posts: 10
|
Posted: Mon Jan 21, 2008 1:07 am Post subject: |
|
|
pkSML wrote: | What do you mean by interactive buttons?
Do you mean they change when you hover over the submit button or when the submit button is pressed (like MySpace or FaceBook)? |
yes they change when you hover over the submit button but it is still a submit button where you can press on it. |
|
Back to top |
|
 |
pkSML -
Joined: 29 May 2006 Posts: 955 Location: Michigan, USA
|
Posted: Mon Jan 21, 2008 10:32 am Post subject: |
|
|
What you want is a javascript rollover submit button.
Google will get you what you want --> http://pksml.net/search/javascript+rollover+submit+button
The first result looks like a winner!
PHP, of course, just spits out HTML code, so you'll just need to put the javascript in your PHP page. If it's in PHP tags, make sure the quote signs are properly escaped. _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
 |
obener -
Joined: 11 Jan 2008 Posts: 10
|
Posted: Tue Jan 22, 2008 11:33 am Post subject: |
|
|
pkSML wrote: | What you want is a javascript rollover submit button.
Google will get you what you want --> http://pksml.net/search/javascript+rollover+submit+button
The first result looks like a winner!
PHP, of course, just spits out HTML code, so you'll just need to put the javascript in your PHP page. If it's in PHP tags, make sure the quote signs are properly escaped. |
i put the interactive button in an example html file. could you please tell me how i can check for this button if it is submitted or pressed?
http://www.geocities.com/omerbener/login.zip |
|
Back to top |
|
 |
pkSML -
Joined: 29 May 2006 Posts: 955 Location: Michigan, USA
|
|
Back to top |
|
 |
obener -
Joined: 11 Jan 2008 Posts: 10
|
Posted: Wed Jan 23, 2008 2:29 pm Post subject: |
|
|
By the way how do you check if the button that you created above is pressed in the php coding. Also how do you make it(the flow) go to a html page in a php code?because what i want to do is that i want to have a login page and then check it on the next page with a animation saying the password is being checked if it is true then it will go to the next html page.if not then it will go back to the login page showing the errors.
Thanks again for all the help |
|
Back to top |
|
 |
pkSML -
Joined: 29 May 2006 Posts: 955 Location: Michigan, USA
|
Posted: Thu Jan 24, 2008 2:54 am Post subject: |
|
|
I would just make button3.jpg an image that simply says "verifying password..." instead of "login". That's really all you need.
Make the action of the form the script that processes the login information
Success: redirect them to the success page (PHP would send a location header)
Failure: point them to the login page (also a redirection from a PHP location header)
Otherwise, a more complicated approach would be to have an intermediary page that has a meta refresh of, say, two seconds to go to another page based on success or failure. That's too much work for something so simple if you ask me.
As far as PHP, any HTML code fits in a php document. The only thing parsed by PHP is what's between the PHP tags. _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
 |
obener -
Joined: 11 Jan 2008 Posts: 10
|
Posted: Thu Jan 24, 2008 1:45 pm Post subject: |
|
|
pkSML wrote: | I would just make button3.jpg an image that simply says "verifying password..." instead of "login". That's really all you need.
Make the action of the form the script that processes the login information
Success: redirect them to the success page (PHP would send a location header)
Failure: point them to the login page (also a redirection from a PHP location header)
Otherwise, a more complicated approach would be to have an intermediary page that has a meta refresh of, say, two seconds to go to another page based on success or failure. That's too much work for something so simple if you ask me.
As far as PHP, any HTML code fits in a php document. The only thing parsed by PHP is what's between the PHP tags. |
I will have a go at the way you suggested and see what happens. I will also upload a copy of it so you can have a look on how well I did. |
|
Back to top |
|
 |
|