The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Still need some help
I have a link that I am using to call on a php file with an id in it. For some reason the external file doesn't get the id.
If I use http://www.myplace.com/my.php?do=edit&id=133 and I have in my php file Code:
if ($_REQUEST['do'] == 'edit') { $ba = $db->query("SELECT * FROM " . TABLE_PREFIX ."mytable WHERE id='$id'"); Any ideas what has changed in 3.51 that the file doesn't get the id number? It used to work in 2.xx just fine. Thanks, Parker |
#2
|
||||
|
||||
and what's the variable $id in your script?
|
#3
|
|||
|
|||
It should at least be $_REQUEST['id'], but using it like this in a query, will open your script to SQL insertions.
You should really consider sanatizing the input before using it. |
#4
|
|||
|
|||
the variable id comes from the link after the do=edit.
Marco: So something like Quote:
|
#5
|
||||
|
||||
TRY:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|