$_GET['variabila']

Ai o întrebare legată de PHP? Incercăm să îi găsim soluţie. Sau poate doar vrei să publici un cod interesant.

Moderatori: Zamolxe, Moderatori

th3ph4r4oh
Junior Member
Mesaje: 30
Membru din: Mie Iul 11, 2007 2:20 pm
Localitate: Bucuresti
Contact:

$_GET['variabila']

Mesajde th3ph4r4oh » Lun Sep 03, 2007 6:15 pm



I used to do a little, but a little wouldn't do. So the little got more and more, I just keep tryin' to get a little better, a little better than before.

Avatar utilizator
flubber
Senior Member
Mesaje: 240
Membru din: Mar Mar 14, 2006 9:47 pm
Localitate: Bucuresti

Mesajde flubber » Lun Sep 03, 2007 6:30 pm

perl rullz

Avatar utilizator
azzuro
Senior Member
Mesaje: 297
Membru din: Mar Iul 05, 2005 2:30 am

Mesajde azzuro » Lun Sep 03, 2007 6:30 pm

$_GET este de fapt un array pe care il poti prelucra cum vrei.
Da un print_r($_GET) si ai sa il vezi.

$n e numarul tau, nu stiu daca il stii
$values = array();
for ($i=1;$i<=$n;$i++) {
if (isset($_GET['xx'.$i])) // daca exista $_GET[XX1] $_GET[XX2]....
$values['xx'.$i] = $_GET['xx'.$i];
}
print_r($values);
Si o sa ai in array-ul asociativ $values toate campurile care te intereseaza

Avatar utilizator
flubber
Senior Member
Mesaje: 240
Membru din: Mar Mar 14, 2006 9:47 pm
Localitate: Bucuresti

Mesajde flubber » Lun Sep 03, 2007 6:36 pm

ori $_SERVER['QUERY_STRING'] iti da toti parametrii get
perl rullz

th3ph4r4oh
Junior Member
Mesaje: 30
Membru din: Mie Iul 11, 2007 2:20 pm
Localitate: Bucuresti
Contact:

Mesajde th3ph4r4oh » Lun Sep 03, 2007 7:10 pm

I used to do a little, but a little wouldn't do. So the little got more and more, I just keep tryin' to get a little better, a little better than before.

Avatar utilizator
UnD3aD
Senior Member
Mesaje: 351
Membru din: Lun Apr 10, 2006 2:01 pm
Localitate: Cta
Contact:

Mesajde UnD3aD » Lun Sep 03, 2007 11:11 pm

Programming is like chewing a pack of bubble gum. If you chew it all at once you're going to die.




Înapoi la “Cod PHP”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 16 vizitatori