# $_request



## DJ [email protected] (Aug 8, 2001)

hey all,
i am having difficulty with this silly $_REQUEST thing 
could someone (snakey) explain to me how to use it?

i have tried (i think miserably) here

```
$sql = "INSERT INTO clans (name,leader,contact,site,nomembers,wins,loses,points) VALUES ($_REQUEST['name'],$_REQUEST['leader'],$_REQUEST['contact'],$_REQUEST['site'],$_REQUEST['nomembers'],'0','0','0')";
```
and i get this error
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /www/agn_38872/djclan.auscstrike.com/html/tourney/add.php on line 12

that is line 12

PLEASE HELP EM!!!

thanx


----------



## Snake~eyes (Apr 18, 2002)

what the hell is $_request????????????

ive never seen that before

if its suppose to be a variable all variables must start with a letter


----------



## DJ [email protected] (Aug 8, 2001)

$_REQUEST is used to get the info out of, like, a HTML textbox or something if global_variables = off

and its crap cuz i cant make it work 

and my web host has global_variable of


----------



## Snake~eyes (Apr 18, 2002)

uhhh ive never heard of that

can i see where you're trying to use this

i mean psot the php code


----------



## DJ [email protected] (Aug 8, 2001)

i did

```
$sql = "INSERT INTO clans (name,leader,contact,site,nomembers,wins,loses,points) VALUES  ($_REQUEST['name'],$_REQUEST['leader'],$_REQUEST['contact'],$_REQUEST['site'],$_REQUEST['nomembers'],'0','0','0')";
```
i have text fields on the site called name, leader, contact, site, and nomembers

and because the server has global_variables OFF i cant just use $name i have to use $_REQUEST['name'] but its not working


----------



## Snake~eyes (Apr 18, 2002)

no on the page you have to have a process page

a form page then you hit submit and it goes to the process page where it then puts your variables into a sql database

and talk to your host, he must be a real jackass


----------



## DJ [email protected] (Aug 8, 2001)

if your interested the way to do it is this

```
$sql = "INSERT INTO clans (name, leader, contact, site, nomembers, wins, loses,". " points) VALUES ('". $_REQUEST['name'] ."', '". $_REQUEST['leader'] ."', '". $_REQUEST[' contact'] ."', '". $_REQUEST['site'] ."', '". $_REQUEST['nomembers'] . "',  0, 0, 0)";
```
its not like i can just talk to my host as they host quite a few sites (1000+) and.. yeh


----------



## DJ [email protected] (Aug 8, 2001)

hmm.. wow, long post ---------------------------------------->


----------



## Snake~eyes (Apr 18, 2002)

ewll your host is too big then
even if you should still shoot an email, its worth a try.

get a new host.. lol


----------



## DJ [email protected] (Aug 8, 2001)

hmmmm.. no because my host now is free and has no ads. i dont want to pay and its pretty good for free and no ads


----------



## Snake~eyes (Apr 18, 2002)

there are other free sites that support php


----------



## DJ [email protected] (Aug 8, 2001)

lol.. thankx but i want to stay with ausgamers cuz im slowly working towards becoming admin there


----------



## Rockn (Jul 29, 2001)

Why don't you hard code some values in there and see if the table is updated or not. If it updates then it's a problem with your form.


----------



## DJ [email protected] (Aug 8, 2001)

hmm.. i never thought of that


----------



## Rockn (Jul 29, 2001)

And you are going to be an IS man.....LOL


----------



## DJ [email protected] (Aug 8, 2001)

lol.. im still learning


----------

