Welcome to Dream.In.Code
Become a PHP Expert!

Join 149,913 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 2,189 people online right now. Registration is fast and FREE... Join Now!




failed to data passing

 
Reply to this topicStart new topic

failed to data passing, is iframe the cos??

chitara
18 Nov, 2006 - 03:07 AM
Post #1

D.I.C Head
**

Joined: 16 Dec, 2005
Posts: 74


My Contributions
After the new setup in IIS, PHP & mysql I failed to passing data through iframe.

My codes are like>>


**[

*My first file: index.php
CODE
<a class=left_link href="php/include_gen.php?pg=1">a</a>
<a class=left_link href="php/include_gen.php?pg=2">b</a>
<a class=left_link href="php/include_gen.php?pg=3">c</a>
<a class=left_link href="php/include_gen.php?pg=4">d</a>
<a class=left_link href="php/include_gen.php?pg=5">e</a>
<a class=left_link href="php/include_gen.php?pg=6">f</a>


*My second file: include_gen.php
   <?
//--------------------------- Script for getting Page --------- ----------------------------------------

$pg_query="select gn_pg_id from gen_page_tab where gn_pg_id='$pg'";
$pg_result=mysql_query($pg_query);
$pg_row = mysql_fetch_object($pg_result);

?>

  <table border="0" cellpadding="0" cellspacing="0" width="557" height="420">
      <tr>
        <td width="1" bgcolor="#FFBF00" height="400"><img src="../images/templete/gap.gif" width="1" height="420"></td>
        <td width="1" height="420"><img src="../images/templete/gap.gif" width="5" height="420"></td>
        <td width="599"><iframe src="include_gen_in.php?page=$pg" marginwidth="0" frameBorder="no"  bordercolor="red" scrolling=yes width="597" height="445"></iframe>
        </td>
      </tr>
    </table>



*My third file:include_gen_in.php

<?php
        
        include('../bbl_admin_bb/include/db.php');

        <link href=../images/style.css type=text/css rel=stylesheet>";
    
?>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<br>
<?php
echo $page;
$pg_query="select gn_pg_name, gn_pg_details from gen_page_tab where gn_pg_id='$page'";
$pg_result=mysql_query($pg_query);
$pg_row = mysql_fetch_object($pg_result);

echo "<font class=title_online>". $pg_row -> gn_pg_name. "</font>";
echo "<p class=head align=justify>".$pg_row -> gn_pg_details."</p>";

?><br>
</font>
</body>
</html>






table formate

CODE
CREATE TABLE `gen_page_tab` (
  `gn_pg_id` int(11) NOT NULL auto_increment,
  `gn_pg_name` varchar(100) default NULL,
  `gn_pg_type` varchar(100) default NULL,
  `gn_pg_details` text,
  `date` varchar(25) default NULL,
  `status` varchar(25) default NULL,
  `position` varchar(25) default NULL,
  PRIMARY KEY  (`gn_pg_id`)
);


]**

Can anyone please tell me why- iframe src="include_gen_in.php?page=$pg" here page is not taking the value in include_gen_in.php file???

But this is working in apache server very well...

PLEASE HELP ME!!!

[mod edit] please use code tags!

This post has been edited by hotsnoj: 19 Nov, 2006 - 09:21 PM
User is offlineProfile CardPM
+Quote Post

snoj
RE: Failed To Data Passing
19 Nov, 2006 - 09:20 PM
Post #2

Fell off the face of the earth
Group Icon

Joined: 31 Mar, 2003
Posts: 3,325



Thanked: 9 times
Dream Kudos: 750
My Contributions
It's not "sending" data because you're not sedning it.

You are breaking out of PHP code and then using PHP variable, so the iframe is going to a url that is getting bad data.
User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 02:06PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month