/    Sign up×
Community /Pin to ProfileBookmark

Form submition

couple of questions. i searched about this and couldn’t find anything untill i got bored.
1) i know firefox has an issue on sending form inputs by id, i.e.
<input type=”text” id=”myField” />
ff won’t submit myField however if i add name attrb
<input type=”text” id=”myField” name=”myField” />
why does it do that?

2) is it possible to submit a form (<form action=”someserver.php” method=”get”></form>) and remaining on the same page without using ajax calls?(i guess if the form is embeded into php?)

Articles about these questions would be greatly appreciated.

Thanks in advance.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@hex1a4Jan 11.2008 — 2) is it possible to submit a form (<form action="someserver.php" method="get"></form>) and remaining on the same page without using ajax calls?(i guess if the form is embeded into php?)

Articles about these questions would be greatly appreciated.

Thanks in advance.[/QUOTE]


Yes. Simply set ACTION to the same page. For example:

If the form is on mypage.php you can set action="mypage.php"
Copy linkTweet thisAlerts:
@roscorJan 12.2008 — or[code=php]<form name="yourformname" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" >[/code] which on submission of your form will parse itself and return the result which you have set via your code, be that validation, logon, etc
×

Success!

Help @AluminX spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...