Help.. php mysql javascript and frames
phuschnickens
Beverly Hills, Michigan Member
I'm using frames... even though i think they suck my needs make pretty good use of them i think. I'm using php and mysql. I'm carrying the input from a form on the previous php page via the $_POST variable. In the next php file (the one I'm struggling with), I set a javascript variable to equal the $_POST variable. My goal is to reference the javascript variable in "frame src="variable' + ' .pdf"> . I've run into a few different things, but think i'm close. For some reason the <skript></script> tags (and what's held within) totally kill the rest of the file. I get rid of that section of code and the frames magically reappear. Oh, and I have tried moving the script tags around... and making two separate script sections, etc.
Any help is greatly appreciated. Had to attach the php file in a txt file bc icrontic doesn't like to see it posted. Thanks!
Any help is greatly appreciated. Had to attach the php file in a txt file bc icrontic doesn't like to see it posted. Thanks!
0
Comments
[html]
<frameset rows="150px, 80%" frameborder = "0">
<frame src="<?php echo $_POST; ?>.pdf">
</frameset>
[/html]
Your error was that you simply stated the POST variable without actually echoing it into the document. If you look at your source after the page loads, it probably said that it was setting the Javascript variable to nothingness.
In any case, you can deposit the PHP variable right into the page without needing to make it all complicated with Javascript.
so simple.
thank you thank you.