MySQL data read back into Form...

User 2212453 Photo


Registered User
10 posts

Eric
the problem I now have is that I have to change the extension of the .html file to .php to accommodate the "="<?php include" - not a problem, but the when I change the iframe statement - nothing loads?? See iframe below with the php changed. Can you help?

<!-- start of address Form -->
<script type="text/javascript">document.write(unescape("%3Ciframe id=\"fb_iframe\" src=\"Address%2520Change.php" + window.location.search + "\" width=\"642\" height=\"754\"allowtransparency=\"true\" scrolling=\"no\" frameborder=\"0\"%3E&lt;a href=\"Address%2520Change.php\" title=\"Address%2520Change\"&gt;Check out my CoffeeCup Form&lt;/a&gt;%3C/iframe%3E"));</script>
<noscript>
<iframe width="642" height="754" style="border:none; background:transparent; overflow:hidden;"
id="fb_iframe" src="Address%20Change/Address%20Change.php">
&lt;a href="Address%20Change.php" title="Address%20Change"&gt;Check out
my CoffeeCup Form&lt;/a&gt;
</iframe>
</noscript>
<!-- end of address Form -->
User 187934 Photo


Senior Advisor
20,239 posts

I would remove the spaces from any names you have and then check if things work. Spaces can cause problems with php scripts.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2212453 Photo


Registered User
10 posts

Hi,
I remove the space and redid the form - same problem. Further investigation shows the following -
a) if I change the src in the iframe to .php and the both the .html & .php file are on the server the .html file is used.
b) if I delete the .html file on the server nothing is loaded.
c) if I remove the script lines and just leave the iframe then the .php file is used (whether the .html file is there or not)

Therefore, I think something in the script is forcing use of the .html file. Any thoughts?

Thanks
Chris
User 187934 Photo


Senior Advisor
20,239 posts

Try removing the script from around the iframe code.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2212453 Photo


Registered User
10 posts

c) if I remove the script lines and just leave the iframe then the .php file is used (whether the .html file is there or not)

The .php file is loaded but no script no form processing

Chris
User 187934 Photo


Senior Advisor
20,239 posts

Are there any errors on the server?
error_log
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2212453 Photo


Registered User
10 posts

Eric
no errors in error log.
Also .htaccess = "AddType application/x-httpd-php .html"
This line in html file
<input type="text" name="Old_Addr1" value= "<?php echo "It works! again";?>" readonly>
Just shows the text <?php echo "It works! again in the field box, I have proved that putting php code in this file will not work - I tried an exit and the system ignored it. Yet there is another file in the same directory which is .html and executes a php echo okay.

Is there another way?


Thanks
Chris



User 187934 Photo


Senior Advisor
20,239 posts

I don't think I've seen your php code to pull that data from your mysql.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2212453 Photo


Registered User
10 posts

Eric

I can't get the simple php echo to work, that's my problem?
<input type="text" name="Old_Addr1" value= "<?php echo "It works! again";?>" readonly>

Thanks
Chrsi
User 187934 Photo


Senior Advisor
20,239 posts

You must have a server issue as I made sure everything works by using your exact code here.
http://ericrohloff.com/coffeecup/ccforum/test.html
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.