Forum Moderators: coopster

Message Too Old, No Replies

getting fileid var from database

         

php4U

6:49 am on Sep 23, 2007 (gmt 0)

10+ Year Member



I have been around php for awhile, but new to these forums. What I am trying to do is pull info from a MySQL database to populate an XML RSS feed. I have done this on other sites, but I am having trouble getting the $fileid var on this one. To build the link I am using the following...

$link = htmlentities("http://$sitename/index.php?action=file&fileid={$fileid['fileid']}");

This is what worked on the others...
$sitename/index.php?id={$id['id']}");

So in my current case I think my problem is with the action=file part, and I also tried references like $fileid = $_GET[fileid]; which I couldn't get work either. Any suggestions would be helpful.

Thank you,
Brad

Habtom

10:01 am on Sep 23, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld

$link = htmlentities("http://$sitename/index.php?action=file&fileid={$fileid['fileid']}");

It seems your RSS output generator is already coded on the index.php, if I understand you correctly, you are able to use the code as you haven't got the right parameters.

$sitename/index.php?id={$id['id']}");

If this worked for you, on the other URL you should do the following:

$link = htmlentities("http://$sitename/index.php?action=file&id={$fileid['fileid']}");

Try the above, if it does it for you fine, if not you can post part of the code where it is called, and we will help you figure it out.

Habtom

[edited by: Habtom at 10:02 am (utc) on Sep. 23, 2007]

php4U

8:10 pm on Sep 23, 2007 (gmt 0)

10+ Year Member



Thank you for your reply and welcome...it seems like a really nice community here. I went back and double checked everything and it looks like in my "while" loop I still had "id" defined. Once I changed it to "fileid" this started working.

Thank you,
Brad