sending data from one page to other

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
adkPrasanna
New php-forum User
New php-forum User
Posts: 8
Joined: Tue Feb 02, 2016 12:30 am

Sat Jul 21, 2018 6:43 am

I have a submit button,
<input type = "submit" name = "edit" value = "<?php echo $row["id"]; ?>" />
Its fine, I can get the id in another page using, $_POST["edit"]
The problem is that, in first page the text in the button is the value of id.
I want to write Edit on the button.

User avatar
hyper
php-forum Fan User
php-forum Fan User
Posts: 743
Joined: Mon Feb 22, 2016 5:52 pm

Sat Jul 21, 2018 8:07 am

Try using <button>

chorn
php-forum Fan User
php-forum Fan User
Posts: 562
Joined: Fri Apr 01, 2016 2:18 am

Sat Jul 21, 2018 12:33 pm

Use a form, like <form>, set method-attribute, like method="post".

adkPrasanna
New php-forum User
New php-forum User
Posts: 8
Joined: Tue Feb 02, 2016 12:30 am

Sun Jul 22, 2018 8:54 pm

Thanks for your response,
i used input type = "hidden" to send the variable, finally done the job.

Post Reply