mark103 Posted April 2, 2013 Share Posted April 2, 2013 Hi guys, I am working on my tv guide website and I start to kick it off. I am going to store the channels name in a mysql database, but I am not sure how to input each channel name in each different div tag like "channel1", "channel2", "channel3", "channel4", "channel5 and "channel6" when I store more than 4 channels in the database. Does anyone know how? The second things I want to know how I can check on the tv guide program website to compare the time how long the program will last for so I can then resize the image and input each program title in each text on each image instead of create the rows? Any advice would be much appreciated. Thanks in advance Quote Link to comment Share on other sites More sharing options...
Barand Posted April 2, 2013 Share Posted April 2, 2013 What is the significance of "more than 4" channels? Quote Link to comment Share on other sites More sharing options...
mark103 Posted April 2, 2013 Author Share Posted April 2, 2013 It got nothing to do with you, it is for my own private use. however, I have output the data from mysql to html, but i don't know how to read the php in html. do you know how? And do you know how i can check the program time on the programme website to see how long the programme will last for, e.g the programme start to run 8:00pm to 8:30pm. Do you know how? Quote Link to comment Share on other sites More sharing options...
joecooper Posted April 2, 2013 Share Posted April 2, 2013 Rude? Quote Link to comment Share on other sites More sharing options...
mark103 Posted April 2, 2013 Author Share Posted April 2, 2013 Rude? It is not rude, it is very rude to ask people "what website you are making and what you are using them for". That's rude to ask. Quote Link to comment Share on other sites More sharing options...
Barand Posted April 2, 2013 Share Posted April 2, 2013 I was actually concerned about your table structure and if it limited the channels. But I won't ask any more questions, nor will I answer any. Quote Link to comment Share on other sites More sharing options...
Jessica Posted April 2, 2013 Share Posted April 2, 2013 That's not what Barand asked. Good luck getting help when that's the way you respond to a simple question. Quote Link to comment Share on other sites More sharing options...
mark103 Posted April 2, 2013 Author Share Posted April 2, 2013 I was actually concerned about your table structure and if it limited the channels. But I won't ask any more questions, nor will I answer any. I understand that and I appriecated it, but you don't need to ask about what is the significance of "more than 4" channels. However, I need to find a way for solution. I have created a mysql database to store the website information which I am using this: <?php session_start(); define('DB_HOST', 'localhost'); define('DB_USER', 'myusername'); define('DB_PASSWORD', 'mypassword'); define('DB_DATABASE', 'mydbname'); $errmsg_arr = array(); $errflag = false; $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); if(!$link) { die('Failed to connect to server: ' . mysql_error()); } $db = mysql_select_db(DB_DATABASE); if(!$db) { die("Unable to select database"); } if($errflag) { $_SESSION['ERRMSG_ARR'] = $errmsg_arr; echo implode('<br />',$errmsg_arr); } else { $qrytable1="SELECT id, channels FROM tvguide"; $result1=mysql_query($qrytable1) or die('Error:<br />' . $qry . '<br />' . mysql_error()); while ($row = mysql_fetch_array($result1)) { document.getElementById("channel1").style.visibility = "visible"; document.getElementById("channel1").innerHTML = $row['channel']; } } ?> Now I want to link up the php file in html. Do you know how I can do this and how I can output the data from php to html? Do you know how I can get access to each website when I storing the website links in mysql database and how I can compare the range of programme time before I could resize on each image? I don't want to included my username and password in html as I don't want to take the risk to get my website to get hacking. Quote Link to comment Share on other sites More sharing options...
mark103 Posted April 3, 2013 Author Share Posted April 3, 2013 Any idea? Quote Link to comment Share on other sites More sharing options...
Jessica Posted April 3, 2013 Share Posted April 3, 2013 Read this. The entire thing. http://www.catb.org/~esr/faqs/smart-questions.html Then try again. Quote Link to comment 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.