今天吃了没事干来讲述了一N多年前自己学习php是学习get全局变量的用法了,有需要的入门的朋友可以参考一下.
一,$_GET是获取表method为get形式的数据
二,$_GET获取url.php?i=12 的数据,
上面是我们常用的利用get来获取值的数据,
实例一,取得form的数据
实例代码如下:
- <form action ="get.php" method ="get">
- Name: <input type="text" name="username" />
- <input type ="submit" value="ok" />
- </form>
get.php
假如我填写的是 http://www.phpfensi.com
实例代码如下:
- You are <?php echo $_GET["username"]?>.
输出结果是
实例代码如下:
- You are http://www.phpfensi.com
那么我们的点击提交时url会是什么样式呢
实例代码如下:
- get.php?username=www.phpfensi.com
这样形式了,也就是我们说的第二种获取数据的方法,下面我们来看利用a带参考的
/a.php?value=my
a.php
实例代码如下:
- value的值是 <?php echo $_GET["value"]; ?>.<br />
输出结果是
实例代码如下:
- value的值是 my
这个看上去和form 的method=get没什么区别吧,哈哈,好了文章就到这里了.
get还有一种方法,那就是直接$_GET这样,会是什么形式呢,看实例.
实例代码如下:
- <form action = "checkbox.php" method = "get">
- <input type="checkbox" name="fruit[ ]" value = "Apple">Apple</input><br />
- <input type="checkbox" name="fruit[ ]" value = "Orange">Orange</input><br />
- <input type="checkbox" name="fruit[ ]" value = "Mango">Mango</input><br />
- <input type="submit" value="ok">
checkbox.php文件代码
实例代码如下:
- <?phpecho count($_GET["fruit"]),"<br />";
- foreach ($_GET["fruit"] as $value)
- {echo $value,"<br />";
- }?>
输出结果是
如果你选择Orange和Mango
注明 $_GET不适合于大数据量的获取长度值是不能超过 100 个字符的.
波比源码 – 精品源码模版分享 | www.bobi11.com
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 本站源码并不保证全部能正常使用,仅供有技术基础的人学习研究,请谨慎下载
8. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!
波比源码 » PHP $_GET 获取 HTML表单(Form) 或url数据
波比源码 » PHP $_GET 获取 HTML表单(Form) 或url数据
buy levaquin 500mg online order levaquin 250mg without prescription
buy arimidex generic buy viagra cheap online buy sildenafil 50mg generic
doxycycline 200mg drug lasix 40mg tablet lasix 100mg cost
buy terazosin 1mg generic buy terazosin pills purchase sulfasalazine pills
purchase isosorbide generic imuran 50mg drug purchase micardis pills
norvasc ca buy amlodipine 10mg without prescription tadalafil 40mg uk
order clozaril sale buy decadron 0,0,5 mg pill order decadron 0,5 mg pill
sildenafil pills buy lisinopril 2.5mg generic purchase lisinopril pill
order tadalafil 5mg pill cialis from canada buy viagra
tadalafil cialis viagra 100mg ca sildenafil 100mg england
buy zyloprim 100mg sale rosuvastatin 20mg over the counter buy zetia online cheap
tamsulosin uk order ondansetron 8mg spironolactone for sale
buy generic zocor proscar generic propecia canada
order lasix 40mg online cheap doxycycline drug buy generic hydroxychloroquine 200mg
retin for sale online tadalis without prescription order avana 100mg pill
order cialis 5mg sale order cialis sale tadalafil cheap
diamox 250mg pill diamox 250mg sale imuran 25mg oral
buy digoxin 250mg online cheap purchase molnupiravir sale order molnupiravir generic
buy carvedilol 6.25mg online cheap purchase coreg generic buy amitriptyline 10mg
amoxicillin 1000mg pills stromectol online ivermectin 1%cream
order alendronate 35mg generic fosamax pills cheap motrin 400mg
famotidine usa prograf canada order mirtazapine 15mg online
doxycycline 200mg usa buy doxycycline for sale methylprednisolone brand
buy requip 1mg without prescription order ropinirole 2mg generic order labetalol 100mg
fenofibrate price viagra for men sildenafil pill
buy tadalafil for sale Canadian pharmacy cialis pfizer where to buy ed pills
order provigil 200mg sale order phenergan for sale buy promethazine 25mg generic
prednisone 40mg uk cost deltasone 10mg cheap amoxicillin without prescription
sildenafil pills buy lyrica 150mg online cheap buy generic finasteride 1mg
purchase ivermectin prednisone 5mg canada brand prednisone 20mg
generic ondansetron trimethoprim us order bactrim 960mg generic
isotretinoin sale azithromycin 500mg oral buy azithromycin 250mg online cheap
order generic albuterol buy levothyroxine tablets cost augmentin
prednisolone 20mg canada prednisolone 20mg generic furosemide medication
vibra-tabs generic buy zovirax 400mg generic buy zovirax 800mg online
order imuran 25mg online cheap generic naproxen 500mg naproxen brand
buy ditropan 2.5mg buy generic oxcarbazepine 300mg order trileptal for sale
order zocor 20mg pill simvastatin online sildalis cost
order dapsone generic asacol 400mg pills buy tenormin 50mg generic
buy generic viagra brand viagra levitra or cialis
order uroxatral 10 mg for sale trazodone pills buy diltiazem for sale
purchase promethazine pills pharmacy tadalafil brand name cialis
buy zetia sale methotrexate over the counter methotrexate for sale online
warfarin 5mg pills order generic coumadin order allopurinol without prescription
order zyrtec 5mg sale strattera pills order zoloft 100mg
escitalopram drug oral sarafem 40mg naltrexone oral
tadalafil 5mg brand erectile dysfunction drug where to buy over the counter ed pills
tadalafil 40mg pill pills for erection buy ed pills best price
ivermectin 3 mg tablets stromectol over the counter accutane order
doxycycline 100mg pills oral augmentin 375mg augmentin 375mg brand
oral synthroid 150mcg purchase vardenafil without prescription order vardenafil 20mg online cheap
buy albendazole 400 mg provera 10mg brand order medroxyprogesterone online
praziquantel 600mg cheap purchase praziquantel sale buy cyproheptadine 4mg sale
buy lyrica 75mg online buy generic claritin dapoxetine where to buy
losartan 25mg oral order generic cozaar 50mg topiramate oral
rosuvastatin 20mg ca order crestor 10mg online buy domperidone 10mg sale
buy cheap sumycin buy generic cyclobenzaprine buy baclofen 25mg online
brand flomax 0.2mg aldactone generic aldactone over the counter
betamethasone brand order clomipramine 50mg online cheap sporanox 100 mg for sale
bystolic online buy valsartan 80mg without prescription buy clozapine 50mg for sale
purchase zocor generic valacyclovir 500mg ca sildenafil 50mg uk
cefadroxil 500mg pill buy cheap generic cefadroxil finasteride generic
diflucan us fluconazole order ciprofloxacin 500mg pill
buy flagyl 200mg pill metronidazole over the counter buy keflex pill
buy generic vermox for sale buy generic tretinoin tadalafil cost
buy generic clindamycin buy cleocin no prescription purchase sildenafil online
avanafil ca buy avana 200mg online order diclofenac generic
purchase nolvadex without prescription ceftin sale cefuroxime 250mg brand
clonidine online cost spiriva tiotropium bromide 9mcg canada
buy suhagra 100mg for sale buy suhagra 50mg online viagra sildenafil 200mg
how to buy minocycline buy minocycline generic actos online buy
accutane 20mg us zithromax 500mg over the counter zithromax pills
buy leflunomide 20mg generic purchase leflunomide pill buy sulfasalazine cheap
how much does ivermectin cost buy deltasone 40mg online cheap buy deltasone 10mg
buy furosemide 100mg generic purchase ventolin albuterol ca
buy vardenafil pills generic zanaflex buy generic hydroxychloroquine online
altace without prescription buy amaryl 1mg for sale buy generic etoricoxib over the counter
asacol 400mg without prescription buy asacol 400mg pills order irbesartan 300mg pill
buy olmesartan 20mg pill buy calan cheap buy cheap generic depakote
buy temovate without prescription order buspar pill cordarone usa
albuterol usa pantoprazole generic pyridium brand
baricitinib 4mg for sale order atorvastatin 20mg generic order lipitor 80mg generic
order montelukast pills where to buy singulair without a prescription dapsone canada
order adalat 30mg sale buy perindopril no prescription order allegra 120mg generic