• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

PHP homework

Joined
Dec 2, 2009
Messages
3,351 (0.64/day)
System Name Dark Stealth
Processor Ryzen 5 5600x
Motherboard Gigabyte B450M Gaming rev 1.0
Cooling Snowman, arctic p12 x2 fans
Memory 16x2 DDR4 Corsair Dominator Pro
Video Card(s) 3080 10gb
Storage 2TB NVME PCIE 4.0 Crucial P3 Plus, 1TB Crucial MX500 SSD, 4TB WD RED HDD
Display(s) HP Omen 34c (34" monitor 3440x1440 165Hz VA panel)
Case Zalman S2
Power Supply Corsair 750TX
Mouse Logitech pro superlight, mx mouse s3, Razer Basiliskx with battery
Keyboard Custom mechanical keyboard tm680
Software Windows 11
Benchmark Scores 70-80 fps 3440x1440 on cyberpunk 2077 max settings
Hi all guys!
I got a new homework about php, but simply i don't know how it is done! :confused:
I got stuck at some point:
we should make a button which opens a page for the people who choose "adult" in radiobutton
and one other page for the people who choose "infant".
Anyone can help me?
 
Joined
Feb 13, 2011
Messages
226 (0.05/day)
Location
AUSTIN,TEXAS
System Name ALIENWARE R8
Processor INTEL I5 9500 @3.9Ghz
Motherboard ALIENWARE 02XRCM
Cooling ALIENWAR Liqid Cooler
Memory DDR4 16GB @2.8Ghz
Video Card(s) NVIDIA GForce RTX 2070 8GB
Storage 512 MB M.2, KINGSTON 480 GB SSD,SEAGATE 3 TB
Display(s) VIZIO E-241 25" TV
Case ALIENWARE R8
Power Supply 850 WATTS
Mouse ROSWILL NEON M60
Keyboard ALIENWARE
Software WIN 10
i would google it if it was me..always worked for me in the past when i needed to know how to do something in whatever language i was working on.... find a few code snippets and go from there.... never done php so i had to google it to find a few code examples to get an idea.. doesn't look too terribly difficult...
 
Joined
Sep 15, 2004
Messages
1,583 (0.22/day)
Location
Poland,Slask
System Name HAL
Processor Core i5 2500K
Motherboard Asus P8P67 Pro Rev3.1
Cooling stock
Memory 2x4GB Kingston 1600Mhz Blu
Video Card(s) Asus 560Ti DirectCuII TOP
Storage Kingston 120 3K SSD,WD Black WD1502FAEX
Display(s) LG 1440x900
Case Chieftec Mesh Midi
Audio Device(s) onboard
Power Supply Corsair TX750V2
Software w8

W1zzard

Administrator
Staff member
Joined
May 14, 2004
Messages
27,049 (3.71/day)
Processor Ryzen 7 5700X
Memory 48 GB
Video Card(s) RTX 4080
Storage 2x HDD RAID 1, 3x M.2 NVMe
Display(s) 30" 2560x1600 + 19" 1280x1024
Software Windows 10 64-bit
you make a web page with a form on it that has your input elements, submit the form to a php page where you take the input from $_GET or $_POST and do the right thing
 
Joined
Dec 2, 2009
Messages
3,351 (0.64/day)
System Name Dark Stealth
Processor Ryzen 5 5600x
Motherboard Gigabyte B450M Gaming rev 1.0
Cooling Snowman, arctic p12 x2 fans
Memory 16x2 DDR4 Corsair Dominator Pro
Video Card(s) 3080 10gb
Storage 2TB NVME PCIE 4.0 Crucial P3 Plus, 1TB Crucial MX500 SSD, 4TB WD RED HDD
Display(s) HP Omen 34c (34" monitor 3440x1440 165Hz VA panel)
Case Zalman S2
Power Supply Corsair 750TX
Mouse Logitech pro superlight, mx mouse s3, Razer Basiliskx with battery
Keyboard Custom mechanical keyboard tm680
Software Windows 11
Benchmark Scores 70-80 fps 3440x1440 on cyberpunk 2077 max settings
I know $_GET and post, but it is another webpage :(
It means if $_GET=="female.com"?? else $_GET=="male.com"?
 

W1zzard

Administrator
Staff member
Joined
May 14, 2004
Messages
27,049 (3.71/day)
Processor Ryzen 7 5700X
Memory 48 GB
Video Card(s) RTX 4080
Storage 2x HDD RAID 1, 3x M.2 NVMe
Display(s) 30" 2560x1600 + 19" 1280x1024
Software Windows 10 64-bit
read up on html forms.

when a form is submitted, it sends the form data to an url specified in the <form> tag. make that a php page and your php script sees the form input in either $_GET or $_POST depending on "method" in <form>

all this is documented pretty well, just need to read
 
Top