How to : make a button, click it and generate a form

General discussions related to php

Moderators: macek, egami, gesf

onlo
New php-forum User
New php-forum User
Posts: 2
Joined: Thu Dec 13, 2012 7:12 am

How to : make a button, click it and generate a form

Postby onlo » Thu Dec 13, 2012 7:23 am

I am new to PHP and want to ask you a simple question :

On my web site, I want to create a button : "Description" and once user click it, a new form : "Description" will generate.
I use php to build my web site. I have tried to write them in my index.php file but none of them can generate a "Description" form to me, please help me, thanks.

Method 1 :
<input type="button" value="Description" onclick="description.php" />

Method 2 :
$button = "<input type='button' id='php_button' value='Description'>";
echo $button;

Method 3 :
<form action="description.php">
<input type="button" value="Description" onclick="des_fun()">
</form>

Snaek
New php-forum User
New php-forum User
Posts: 11
Joined: Sat Dec 29, 2012 6:02 pm

Re: How to : make a button, click it and generate a form

Postby Snaek » Tue Jan 01, 2013 9:27 pm

a new form : "Description"

What do you mean by the above quote, please expand on this.


Return to “PHP General”

Who is online

Users browsing this forum: No registered users and 2 guests

cron