I wish to dispaly a form when the user clicks the button in PHp... If any1 knows how to go abt ... plzzz help
bye
d11wtq | No CAPITALIZED titles please
Button click event
Moderator: General Moderators
- akimm
- Forum Contributor
- Posts: 460
- Joined: Thu Apr 27, 2006 10:50 am
- Location: Ypsilanti Michigan, formally Clipsburgh
Unfortunately, we can't just write the code for you.
I can tell you, basic HTML knowledge is required, after which, you then need to either have the PHP on that page with your form, or refer to it from an external php file. Just google HTML forms, I guarentee you'll find everything you need to know the html, as for the PHP be more descriptive as to what you need it to do.
I can tell you, basic HTML knowledge is required, after which, you then need to either have the PHP on that page with your form, or refer to it from an external php file. Just google HTML forms, I guarentee you'll find everything you need to know the html, as for the PHP be more descriptive as to what you need it to do.
-
archanaelenjickal
- Forum Newbie
- Posts: 2
- Joined: Mon Oct 02, 2006 3:27 pm
The page contains information about a hotel in html. Now when the user clicks the button it should go to a survey page of the hotel.. had it ben in HTml it could be done by giivng a link to the new page.... I want to implement the button click event using PHP.. rather tahn simple Html or Java script...
So if some1 cud help out
So if some1 cud help out
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
A button click event is something that happens on the user's browser. You can't detect it using PHP. You have two options:archanaelenjickal wrote:The page contains information about a hotel in html. Now when the user clicks the button it should go to a survey page of the hotel.. had it ben in HTml it could be done by giivng a link to the new page.... I want to implement the button click event using PHP.. rather tahn simple Html or Java script...
So if some1 cud help out
1. HTML - Have a form with just the submit button on it, when the user clicks the button the form is submitted, then the script it's submitted to returns the form you want to display.
2. Javascript - Have the form in a hidden div, and a button that uses Javascript to change the div's display to visible.
Put this in the head of your page
Put this as your link in your BODY:
Simple google search finds this. There is no reason to do this in PHP... as your not passing ANY information.
Code: Select all
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Sven David Hildebrandt (shildebr@online.no) -->
<!-- Web Site: http://home.hia.no/~sdhild99 -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function goToURL() { window.location = "http://YOURURLHERE.com"; }
// End -->
</script>Code: Select all
<form>
<input type=button value="New JavaScripts" onClick="goToURL()">
</form>