0% found this document useful (0 votes)
53 views

PHP Questions

The document discusses using the POST method in PHP to submit a form, explaining how to retrieve submitted values using $_POST and check for empty fields. It also covers using hidden fields to pass additional data and selecting multiple options using a SELECT element in an HTML form submitted via POST.

Uploaded by

pugazhendhi v
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

PHP Questions

The document discusses using the POST method in PHP to submit a form, explaining how to retrieve submitted values using $_POST and check for empty fields. It also covers using hidden fields to pass additional data and selecting multiple options using a SELECT element in an HTML form submitted via POST.

Uploaded by

pugazhendhi v
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

-- PHP quESTlONS --

0
0
W::>,n poS T

pos T n1.elhoJ.

POST fvlETf-10D

It ih lh e,

1obJ, =1 vtW ,:,,\,k JJio.r ;1:, w, eJ f-o 'fF


voJu.~ hubrruJJj vi tL- HTTP PO$ T fY>e}~ •

=1 vM,caJ,l e CCtYL .be

}torYL 0 h ClUf'r 1rt-

rJe.n.1 Wh~ ru. CM Mf-

WCIJ'lt- Ju i°)\Jy\__ P02>T

'VoJu.eh ,, URL
If\_.

when hub ~(tl'),u~


J_oJo_
It l::>UjfloAfh ~°o 1:3 feh

h~ rutm Vu C a.tc .. .
ah >;t,,J.ncr 'b~~
'
It volu.eh not vrMJJe_ in.-- JJuz_ URL ·

f POST met-",,oJ ~.ti) n,o,t J-a.ve__ UIY11to.hon. 4


))le_ Aency)\_ 1 1.h.e.. ~\.Uh '
hfflvdl lh,- cuL

bUbtnlJJJ .th.Q__ HTTP ,


vr Cl bodi

L Phr

$ _ J-li)
~T [
1
V"" "
LA y r a. b 'e .- r\ Cl m e 1 J ,'

Wh Vl1l ,

UR.L..

f\runt2-

,.
- --- ---

Ex~

< htMI :;;,,

..c. boc\~ >


., 'I
" ~? FhP
.:!.jDYrv)_ me lhbd PO.ST O.Ln"o n
echo
•I

$ 5 ERVER_ [
1
PHP _ SELF "J ; ~-, >
,, ,, .,
< inpu.t- t\jPe.. lext name :: '' :fna.l'fle >
.,
<' tOPlA t 1:ype__ : 5Ubmit > ~/ f DYM >

~? Pnp

if ( {_·SfR\JER. ; [\'fl?tJfST _ METHop


1

j !! = PDST '') {

-$ na__me c $_ Pos, C '' jno..-1'()<2 ''J;


·•f ( et1>plj C$ l\ctrn e »
c{
echo No__me empt.y , }
er~e
1
echo $ n°'lY>e } }

<-lbod~ >

.c./nth'lt >
rn_ ..thoJ- Qy ~e ., we_ ~eJ. AA-

wi A, OJL

hu.brnl.t bwfolL ·

,, ,,
bU.bmlJJ.:> )he_ dant bi
~UbrtU t ' .(.n.J2._ J;o/1.I'Y\._ J.aJo._ "Jb

JJv,__ tWL Jo',


we. W/L OJ\O lhvi. Pl-4 P J;i e rn

~e/l(UYLQ_

OUTPUT

NANE :I pu_g0-1
l
l SU B~t T

ru3 °'-l O tJJ.itw rYH'.}/-, °1f


~) whol- tu.~ !n/'L.UJ- ltjPe6 ~fl PHP
I
~ve. ea.il\.. a.I\.

HTNL r~ CV! e_
v~
VVLoaJz"J. e..,

MA ~6W r\)_ to hU.b miJ- (J.__ UJicte JL~

4 J;~ ltjP<V)
4-- ah

H,dcle_n_
.
se,f e,a-

,¼p~

SUbrnJ,t bw-)D n,

(;) HiJ.Je.YL- -lf4J.. :

H7&ote!L ~M ''V'-uJ
oi- ilw_

B~ w,io ? tu e.. lOJ\_ r.NJ.}-c vJh e/JLQJ\. o:__

.Jo}.)y\_ J,vv, b= Au.brvv.·1lui.. .


L
'I ., ,, ,,
-=- tllDD~N n.o..lYle_ va\u.e

<' h th1 r >

,, ,, .
I o.lH"6Yl _ Page . rnf
'
L lctbe.. I f-oY- ,, :J na.me II
-c (Jo.Pel >
> tiY5t f'\D..TYl e

L.. inpu..t
,, ., .,
~e.~ t iA jnam~ >
•I
l~Pe__ e :,. \I :f-name n~tne
., ,, ,, ,, ' ,, .,
inpu.t \:.'.,Pe ::: hi&Jen ;J '" CUSl :r P n am{' ., Cl(~~!O
,,
\la1ue I'
Oo\ >
zltnPu t \JDJUe._

.clbody > L ( h tt() I>

OUTPUT

Fi\fst MIYl e : [ •u.ea.zlierlC!hi j [ SUBljlT ]

-f no.me OJ.stzD : 001


Setect-

01 e.ole
• .::Jhe 5ELEC.T

.muJJifJ e_

• 'Jhe num beJt f


Xne;., m
• '{ iru. ~e.. mu.Wfl e f aN:VYJeleJ? ., 1A.J2. Uh£,l,

WJ'L he)e,d rn i<M-,J.s2 oiJ? 0M 0

roM JA.Q__ %4

b~ .lrtJ2 CiY I Wh_.<2rl t.tuv~·


<2.x

cu.non
" =- ''/o..cn"'on_po..ge . PhP " ;

(a.be I :}DY ''co.ts,, '7 choose o... cay ·. < ((1,.Jel >
., ,, . n

.t! Se(ect- ncuYle -- cars ~cl , cars


,\ II

<'Ofrfon vatue \Jo1vt> '?\JOt\JO

euTPUT :

Choose "' ca.r I" 01 0


" • [ / S1JBM11 )

CO..~S -= YDIV D
LABELS

:the l°o <kf1'"" .Jhll .tai,J.

buJJzJtL , in/u)l , tnele.Jl ?


~ekd le w.JL

be
J;wo war
pnovi~ n-a i~

-F'l-- OJJ..;1.ibule

Vut ID ·

l tU>e I > jov'n'\ content - - - - <. ( la.be f >

XaJYlJ~l.tt &

,.
St u.de n l
.. > ~u;..d.ent L /labe.J >
L J.abe: f

L!: inpu t

~ ~ put naro e
\;D:u.2 ,
.
f=Ji~a e >

e f Jorm >

OUT PUT .:

@ tn£Ue.. 0 f e m a le.
S Ubtvu t. bt.AIJ-Of\.,

:Jh.Lh

hUblYJ)- bwlDrt, will
w-llell- ,thQ_ doJ-a_ whQJ'L- JJ-u,_, we})~

ovJ- thp_
fJJY\. 1)-u:2_ 61Jbn,v:I btJ:m, ,

.th_Q_
fAM JoJ-o___ i/2 MN -fA- F M ~ fb

Pf-IP tJe .

.,
<- ~nput:, type < 5ubrn~ t >

<C ht.m r >

Lb0Jt3
,,
.c joyrn '.:f,\lf-i'on. ,, ,, jY)etheicl : •'rosT >
I ,, ,, .,
te. X t
•'
No..rr,e : < ;np11tt tBPe !:" f\ome. r\.Q.yYl Q >
,, .. ,t

f tr>a rl in ru.t t'dPe ._ te.,q rame :- ~I >


,,
Ltnput ~Pe ~Ubl'Yl;t I fvyfYt
.cl.bod~ > <'./ht.lYll>

C>U TPUT
NtiN~ I f't.Jgo J
)
.
EN/Ill [· t\b(~~tno..;j. lO~
•,n..

?.

Cl ).;,v,JJ-

e Jlf-,0 I) UA e
)eov¼ J}tQ_ wrnfi,W eJl.,,, l,lf)o.jJendeJ. w~le,,

I
Ati'Jl 109~ iY\.. .
h)")J<_
*
1: );m}}h }:ht2
s,ey.;OIL A(UWJ)r

.n}~ oJJcuM' hud-\. uJh efL, t,/l.Q,


\

emµ 0 };-u eh /1) We_, ar,o}J, "1l- e+j ¼/4bl)



heN--1-.0fL

Whef) 5:!:>L ih

ru lDfl ~erJiuJe
w,ih
" o)lu.A
};.h..QjJL IP

-$- SERVER tRel'YlcJe _c,JJr ];

• '· uJ he.n e VVl "Nj Po/ fo ed.,,, ,._J "- ,<,Vwl,Y\,

ih 0-v0-..t)a,(,,{e • n J~ ~°bVl JA;)~-


., t .tJtJ2_ ND~ If cloffit? J (Y'QF(A .
--,

( $_ [' iFJ $_$ERV ER L '.Ji em Die _oJJr_]


.J~sevent - user () )

.;::; we
bno ,w, eJJ/2 Welt a~ ff , w luLh
t t l, ch.t.t. m
)J, e, W ;Je. V/Vuel~ 1-- /;,;wW>.t)L .P-j fV> ,

Vv,,,..l oM .uA I.O m{wJe.h r,JJY\l, wh.ic.Pl inJrf

6 ey-.lo(\_ fx oJtorL I\~ wh m CA.

tu eJ., W Q/::) m f n eh er\k hv/-.,to '(\., ID

.-tJ1 e )loJ.heJ-t ,lel~ J.hL

cJlw e... aw .
j~
*
tu.,eJl,,
It WJ\_ lur)e/\. 0...

)o fC½6 a--
o-JvOJV~
}) e,)-/.;f D '(L ID
1 •IY\._
JM_..

juL
ab1JJ'(t
G-tET {?cu.f
JA.o URL •
- - -- -- -

L~ PhP

~essf or, _ s tD'\'r ( ') ;

4 L '· is set ( -1-- S.ESSIOfJ [ I t'.'.:oUnl:' J )) $_ $fSSlok.) r(out11). L

ei.se.. +-t .$ - $E's .s ION r co un J ;


I l,

ec.~o 4-s~ss1o"-f [tccurH'J ',

?>

0 l'\,(_Q_
e
t Y\. il\.Q__ u.;eb

lftQ

.,,el0oJ. -r,u wJ
rr
(j' JJe.¼ . a.. limM

Ah ou.O.cl .tee_ ;t wurJ- t.f- t,no 1Y1 '2CXJ ·

~ - Jh.Q_ .l\~(\_ f-hih Oft-'l,Ocuh ,~ ~w.6. ;/2


aJJOJ..A.Vl «:ivJJ J~ cJ..;»h.'hi,Je

V12 l- t S (D ~7 '

-'> :JO V€.JV- ;re U U]JL

rUA .,
'>

$ ~"oYl _ 1 1 ~ e , . . ;ct,_
~ "O'f'- ID .

You might also like