when i click on submit button:
then it displayed abc if i use <input type='button' name='edit' value="submit"> then its display nothing why?
l
like:
<input type='submit' name='edit' value='Submit'>
if i put
if(isset($_POST['edit']))
{
echo "abc";
}
or give another solution:
Thanks
how to get value form button
Moderator: General Moderators
-
manojsemwal1
- Forum Contributor
- Posts: 217
- Joined: Mon Jun 29, 2009 4:13 am
- Location: India
-
manojsemwal1
- Forum Contributor
- Posts: 217
- Joined: Mon Jun 29, 2009 4:13 am
- Location: India
Re: how to get value form button
waiting for reply
Re: how to get value form button
You will not get value from button if its type="button". Only type="Submit" will submit the form. Also you need to have <form>.
-
manojsemwal1
- Forum Contributor
- Posts: 217
- Joined: Mon Jun 29, 2009 4:13 am
- Location: India
Re: how to get value form button
Thanks for your reply
actually iam using of Image button like <input type="image" src='a.jpg' name=j>
and i have some event handler like Check user uncheck user edit etc. so i want when userclick on image button that time i want to know which button has user pressed for further processing
.
actually iam using of Image button like <input type="image" src='a.jpg' name=j>
and i have some event handler like Check user uncheck user edit etc. so i want when userclick on image button that time i want to know which button has user pressed for further processing
.
Re: how to get value form button
I would use javascript event handling for that - ajax if on-the-fly server-side processing is required.
-
markjames283
- Forum Newbie
- Posts: 1
- Joined: Sat Jul 17, 2010 8:06 am
Re: how to get value form button
Assalam Aalkam
Sir,
i m new designer in HTML and PHP sir i m very confused then i m scripts attached in PHP . because i m not understand the video scripts on webpage so please give me a proper solution in my scripts the video link in webpage.
Sir,
i m new designer in HTML and PHP sir i m very confused then i m scripts attached in PHP . because i m not understand the video scripts on webpage so please give me a proper solution in my scripts the video link in webpage.
Re: how to get value form button
You can submit form using onclick event on images, then you php code will be like this
Code: Select all
if (isset($_POST['edit_x']))
{
echo "abc";
}