kenmay09 Posted January 26, 2009 Share Posted January 26, 2009 hi! just want to ask, HOW CAN YOU USE THE <FRAMESET> CODE IN PHP? when i program it, their's no output on my browser? is their a problem with browser i have? i use mozilla firefox! pls reply... need help pls... thank you so much...... Quote Link to comment https://forums.phpfreaks.com/topic/142490-using-frameset-php/ Share on other sites More sharing options...
premiso Posted January 26, 2009 Share Posted January 26, 2009 You have to echo or print it out to the browser. Since PHP is not HTML they do not work right together without the echo tag or being outside of PHP. Also bright pink font is just annoying. Quote Link to comment https://forums.phpfreaks.com/topic/142490-using-frameset-php/#findComment-746583 Share on other sites More sharing options...
kenmay09 Posted January 26, 2009 Author Share Posted January 26, 2009 can u give example? because im new to php.... im sorry... Quote Link to comment https://forums.phpfreaks.com/topic/142490-using-frameset-php/#findComment-746602 Share on other sites More sharing options...
premiso Posted January 26, 2009 Share Posted January 26, 2009 <frameset> <!-- this is not in php --> <?php echo '</frameset>'; // this is php ?> But why would you need php to make a frameset? That is basic HTML and should not require php at all....? Quote Link to comment https://forums.phpfreaks.com/topic/142490-using-frameset-php/#findComment-746610 Share on other sites More sharing options...
kenmay09 Posted January 26, 2009 Author Share Posted January 26, 2009 because im trying to make a chat... our professor said we should use the frameset. this is giving me headache...... that's why im asking for some help! Quote Link to comment https://forums.phpfreaks.com/topic/142490-using-frameset-php/#findComment-746618 Share on other sites More sharing options...
premiso Posted January 26, 2009 Share Posted January 26, 2009 because im trying to make a chat... our professor said we should use the frameset. this is giving me headache...... that's why im asking for some help! Look up how to properly use framesets via HTML first. Once you can create a static page with framesets then look into the dynamic part. The actual frameset page can be html, the pages linked inside the frameset, however, would need to be .php. But since this is a school project and you will not learn by me doing it for you. Research basic html framesets. Quote Link to comment https://forums.phpfreaks.com/topic/142490-using-frameset-php/#findComment-746622 Share on other sites More sharing options...
kenmay09 Posted January 26, 2009 Author Share Posted January 26, 2009 yes! my codes are correct.. but it wont appear on my browser..... anywayz.. thanks for the help.... thank you so much! Quote Link to comment https://forums.phpfreaks.com/topic/142490-using-frameset-php/#findComment-746625 Share on other sites More sharing options...
premiso Posted January 26, 2009 Share Posted January 26, 2009 yes! my codes are correct.. but it wont appear on my browser..... anywayz.. thanks for the help.... thank you so much! If you have code, post the code. I am willing to help you if you actually tried first. Just dont expect me to write everything for you. Quote Link to comment https://forums.phpfreaks.com/topic/142490-using-frameset-php/#findComment-746636 Share on other sites More sharing options...
kenmay09 Posted January 26, 2009 Author Share Posted January 26, 2009 here's my code for my frameset <frameset rows="25%,*"> <frame src="message.php"> </frameset> is that correct? Quote Link to comment https://forums.phpfreaks.com/topic/142490-using-frameset-php/#findComment-746649 Share on other sites More sharing options...
premiso Posted January 26, 2009 Share Posted January 26, 2009 http://www.w3schools.com/HTML/html_frames.asp Not quite. <frameset cols="25%,*"> <frame src="navigation.php"> <frame src="message.php"> </frameset> That would probably work, given that you have a navigation.php and message.php and your php server is running. Quote Link to comment https://forums.phpfreaks.com/topic/142490-using-frameset-php/#findComment-746652 Share on other sites More sharing options...
kenmay09 Posted January 26, 2009 Author Share Posted January 26, 2009 thanks a lot... now its working.... my only prob is how it will connect to the database.. Quote Link to comment https://forums.phpfreaks.com/topic/142490-using-frameset-php/#findComment-746665 Share on other sites More sharing options...
premiso Posted January 26, 2009 Share Posted January 26, 2009 thanks a lot... now its working.... my only prob is how it will connect to the database.. You code the DB stuff in message.php That is a page on it's own and it works independently of the frameset page. Quote Link to comment https://forums.phpfreaks.com/topic/142490-using-frameset-php/#findComment-746668 Share on other sites More sharing options...
kenmay09 Posted January 26, 2009 Author Share Posted January 26, 2009 <? $conn=mysql_connect("localhost","root",""); mysql_select_db("$chatScript"); ?> that's my code if i will connect it to the database Quote Link to comment https://forums.phpfreaks.com/topic/142490-using-frameset-php/#findComment-746676 Share on other sites More sharing options...
gevans Posted January 26, 2009 Share Posted January 26, 2009 <? $conn=mysql_connect("localhost","root",""); mysql_select_db("$chatScript"); ?> that's my code if i will connect it to the database You might want to expand that a bit for error testing; <?php $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if (!$link) { die('Not connected : ' . mysql_error()); } // make foo the current db $db_selected = mysql_select_db('foo', $link); if (!$db_selected) { die ('Can\'t use foo : ' . mysql_error()); } ?> From: http://uk3.php.net/manual/en/function.mysql-select-db.php Quote Link to comment https://forums.phpfreaks.com/topic/142490-using-frameset-php/#findComment-746679 Share on other sites More sharing options...
kenmay09 Posted January 26, 2009 Author Share Posted January 26, 2009 thanks a lot.. for your help Quote Link to comment https://forums.phpfreaks.com/topic/142490-using-frameset-php/#findComment-746686 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.