Reply
What am I doing wrong?
Old 05-22-2007, 06:30 PM What am I doing wrong?
scrobins's Avatar
Experienced Talker

Posts: 46
Name: Stuart Robinson
Location: Busselton
I am trying to create an inline frame that displays some data based on a date. Here's the code;

Code:
<iframe src="http://example.com/php/new_blog.php?id=2007-05-22" frameborder="0" width="100%" height="600px" scrolling="auto"></iframe>
The idea is that when the iframe displays it will transfer the ['id'] to the php code and I can use it as a variable in my query. Here's the php for this;

PHP Code:
$nw_today=$_GET['id']; 
However, when I echo $nw_today I get no result. What am I doing wrong?
scrobins is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 05-22-2007, 07:13 PM Re: What am I doing wrong?
mgraphic's Avatar
Truth Seeker

Posts: 2,311
Name: Keith Marshall
Location: West Hartford, CT
Make sure you echo $nw_today after you defined it.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 05-22-2007, 07:19 PM Re: What am I doing wrong?
scrobins's Avatar
Experienced Talker

Posts: 46
Name: Stuart Robinson
Location: Busselton
I do that. Sorry, here's the code that I'm using;

PHP Code:
$nw_today=$_GET['id'];  
echo 
$nw_today
scrobins is offline
Reply With Quote
View Public Profile
 
Old 05-22-2007, 07:22 PM Re: What am I doing wrong?
mgraphic's Avatar
Truth Seeker

Posts: 2,311
Name: Keith Marshall
Location: West Hartford, CT
Test your GET array to see if the values are being passed:

print_r($_GET); will display the get parameters.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 05-23-2007, 07:17 AM Re: What am I doing wrong?
scrobins's Avatar
Experienced Talker

Posts: 46
Name: Stuart Robinson
Location: Busselton
Cheers Keith,

I don't know what happened but after I used this code it started working and now works well. Thanks heaps.
scrobins is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to What am I doing wrong?
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12790 seconds with 13 queries