Jump to content

kvishnu_13

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kvishnu_13's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey, I am working on a clinic website. The clinic uses a software called MRAnywhere, which is an EMR, to manage their patient databases. I want to be able to access the data stored in that software using SQL, and I want to display some of that data on the website. Is it possible? Please reply soon. I dont know if I am posting this question in the right area, but I found no better place. Thanks.
  2. Ok, this might be expecting the impossible but i'll ask anyway!!! Is there anyway that php can grab a screenshot of a web page, save the image, and bring the image back to the main website? This is what I want it to do: 1. The user enters the url in a form. 2. My website should take the url and retrieve the screenshot of the url web page. 3. This screenshot should appear to the user after the form is submitted. Any ideas? Been looking around a lot for some solution...someone help please...
  3. thanks a lot cooldude...it's working!! i couldn't understand wat u did in the beginning, but now, after it makes sense, i've got to admit that that was pretty smart...lol
  4. Hey, Is there any way we can access the title of a web page through php? This is how I want it work: 1. User inputs webpage address in a form. 2. My website should display the title of the inputted website(as in, 'www.google.com' has a title of 'Google - Home'). Any ideas? Help will be greatly appreciated guys...been lingering around a lot for a solution ___ kvishnu_13
  5. Hey guys, I was trying to create a page similar to Opera's Speed Dial just for my personal satisfaction. soo...How do you access the screenshot of a webpage when a link of the webpage is submitted? I dont even know if it is php-related, can u guys at least guide me in the right direction. Please reply Thank You ____ kvishnu_13
  6. That works..that works. Thanks a lot man. I really appreciate ur help.
  7. Yes, I just looked that up, and apparently if u use mysql_data_seek($result), the result will go through the array from the beginning again. Weird thing is...even after I use mysql_data_seek, the code doesn't work. I think the problem is with the syntax of the second while loop itself. Is the syntax right? I am trying to look up stuff as I am posting these messages. Will post a reply myself if I find a solution. Thanks a lot for the reply.
  8. This was what I was trying to do: echo '<table align = "center" border="0" cellpadding="5" cellspacing="0"> <tbody> <tr> <td align = "left"><b>Company Name</b></td> <td align = "left"><b>Direct Stocks Available</b></td> <td align = "left"><b>Per Stock Price</b></td> <td align = "left"><b>Company Rating</b></td> <td align = "left"><b>Buy</b></td> </tr>'; $query = "SELECT * FROM Companies WHERE comp_status = '0'"; $result = @mysql_query($query); if($result) { while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $query2 = "SELECT pl_rating FROM Players WHERE pl_id = '$row[pl_id]'"; $result2 = mysql_query($query2); } } while($row2 = mysql_fetch_array($result, MYSQL_ASSOC) && $row3 = mysql_fetch_array($result2, MYSQL_ASSOC)) { $stocks_num = floor($row2['comp_totValue']/$row2['comp_value']); echo ' <tr> <td align = "left"><a href = "pl_info.php?id=' . $row2['pl_id'] . '"><b>' . $row2['comp_name'] . '</b></a></td> <td align = "left">' . $stocks_num . '</td> <td align = "left">' . $row2['comp_value'] . '</td> <td align = "left">' . $row3['pl_rating'] . '</td> <td align = "left"><a href = "buyD_comp.php?id=' . $row2['comp_id'] . '">Buy</a></td> </tr>'; } } echo '</tbody> </table>'; The problem is, the code is not running through the second while loop, which makes me question whether I can call msql_fetch_result() twice on the same $result. Any thoughts on the error here.
  9. Well, the topic says it..will mysql_fetch_array() work, when returned result is a table? I have worked with codes where the returned result is a row(a one-dimensional array), but when it is table, a multi-dimensional array, how do I work with them? It will be really grateful if someone can explain the process of accessing the values of a returned table.
  10. Hey fert, I tried that and various other combinations with the quotes and functions...still does not work. Are u sure there are no more errors? Thanks for the previous reply man. Does anyone else see an error?? __ kvishnu_13
  11. Hey, I was writing my login.php script, and instead of creating every session one-by-one, I tried to create a function that assigns all the sessions...but it doesn't work for some reason. I don't understand what the mistake is. The code is really simple... function gen_sessions($arr) { foreach ($arr as $k => $v) { $_SESSION['$k'] = "$v"; } } This function is later called in the login.php script itself, after all the validation is done using.... $row = mysql_fetch_array ($sql, MYSQL_NUM); gen_sessions($row); There are no errors, and the login process is also done, but I am not able to access the sessions(session_start() has been added). For example, later in a different page my program is not going through the if conditional: if((isset($_SESSION['11']))) I have a feeling that it is just some syntax error. Please help...
  12. Hey btherl, Thanks for the reply. Tried what u said, and seems like a pretty good idea. But I am getting an error... Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\wamp\www\GUESSCRICKET\header.inc.php on line 11 function make_sub_active($menu, $pag) { foreach ($menu as $p => $n) { if($p == $pag) { //The line below is line 11 echo "<li><a class=\"sub_nav_active_item\" href=\"$p\">$n[/url]</li>"; } else { echo "<li><a class=\"sub_nav_item\" href=\"$p\">$n[/url]</li>"; } } } If u could tell me what is the problem, I will go ahead and implement it in its entirety. Once again...thanks bro.
  13. Hey guys, I tried to create a header file for my website to make it easier to edit the template. It's a php file because I wanted the navigation menu to be dynamic. When you click on a navigation link, based on the link page that is calling the header.php file, the header should change the color of the navigation item. But it is not working for some reason. Here's the structure of the navigation menu: index.php 2.php 3.php 20.php 4.php 5.php 6.php 7.php 8.php 9.php 10.php 11.php 19.php 12.php 13.php 14.php 15.php 16.php 17.php 18.php $main_nav contains the html for the main navigation bar. and $sub_nav contains the html for the sub-navigation bar. All the files above contain a variable $page which is a string of the page name. if the class of a navigation link is main_nav_active_item or sub_nav_active_item, it should have a different color. Everything else is simple conditional statements. The Output of the current code: 1. All the parts of the header are showing up, but the main navigation is not dynamic;i.e., only Home has active color, regardless of which navigation link I click. But the sub navigation bar under Home is working perfectly. 2. When I click on other main navigation links, the page is showing up, but the sub navigation bar is not showing up. The website is guesscricket.com...see the problem for urself. There is no problem with the css files or anything because, before I used the header file, all the files were working fine. Here's the code: <?php if ($page == "index.php" || "2.php" || "3.php" || "20.php") { $main_nav = "<ul id=\"main_nav_list\"> <li><a class=\"main_nav_active_item\" href=\"index.php\">Home[/url]</li> <li><a class=\"main_nav_item\" href=\"4.php\">Statistics[/url]</li> <li><a class=\"main_nav_item\" href=\"9.php\">GUESS[/url]</li> <li><a class=\"main_nav_item\" href=\"12.php\">Links[/url]</li> <li><a class=\"main_nav_item\" href=\"16.php\">FAQs[/url]</li> <li><a class=\"main_nav_item\" href=\"17.php\">About Us[/url]</li> </ul>"; if($page == "index.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_item\" href=\"2.php\">Latest News[/url]</li> <li><a class=\"sub_nav_item\" href=\"3.php\">Register[/url]</li> <li><a class=\"sub_nav_item\" href=\"20.php\">Login[/url]</li> </ul>"; } elseif($page == "2.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_active_item\" href=\"2.php\">Latest News[/url]</li> <li><a class=\"sub_nav_item\" href=\"3.php\">Register[/url]</li> <li><a class=\"sub_nav_item\" href=\"20.php\">Login[/url]</li> </ul>"; } elseif($page == "3.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_item\" href=\"2.php\">Latest News[/url]</li> <li><a class=\"sub_nav_active_item\" href=\"3.php\">Register[/url]</li> <li><a class=\"sub_nav_item\" href=\"20.php\">Login[/url]</li> </ul>"; } elseif($page == "20.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_item\" href=\"2.php\">Latest News[/url]</li> <li><a class=\"sub_nav_item\" href=\"3.php\">Register[/url]</li> <li><a class=\"sub_nav_active_item\" href=\"20.php\">Login[/url]</li> </ul>"; } } elseif ($page == "4.php" || "5.php" || "6.php" || "7.php" || "8.php") { $main_nav = "<ul id=\"main_nav_list\"> <li><a class=\"main_nav_item\" href=\"index.php\">Home[/url]</li> <li><a class=\"main_nav_active_item\" href=\"4.php\">Statistics[/url]</li> <li><a class=\"main_nav_item\" href=\"9.php\">GUESS[/url]</li> <li><a class=\"main_nav_item\" href=\"12.php\">Links[/url]</li> <li><a class=\"main_nav_item\" href=\"16.php\">FAQs[/url]</li> <li><a class=\"main_nav_item\" href=\"17.php\">About Us[/url]</li> </ul>"; if($page == "4.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_item\" href=\"5.php\">Fixtures[/url]</li> <li><a class=\"sub_nav_item\" href=\"6.php\">Rankings[/url]</li> <li><a class=\"sub_nav_item\" href=\"7.php\">Tests[/url]</li> <li><a class=\"sub_nav_item\" href=\"8.php\">ODIs[/url]</li> </ul>"; } elseif($page == "5.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_active_item\" href=\"5.php\">Fixtures[/url]</li> <li><a class=\"sub_nav_item\" href=\"6.php\">Rankings[/url]</li> <li><a class=\"sub_nav_item\" href=\"7.php\">Tests[/url]</li> <li><a class=\"sub_nav_item\" href=\"8.php\">ODIs[/url]</li> </ul>"; } elseif($page == "6.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_item\" href=\"5.php\">Fixtures[/url]</li> <li><a class=\"sub_nav_active_item\" href=\"6.php\">Rankings[/url]</li> <li><a class=\"sub_nav_item\" href=\"7.php\">Tests[/url]</li> <li><a class=\"sub_nav_item\" href=\"8.php\">ODIs[/url]</li> </ul>"; } elseif($page == "7.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_item\" href=\"5.php\">Fixtures[/url]</li> <li><a class=\"sub_nav_item\" href=\"6.php\">Rankings[/url]</li> <li><a class=\"sub_nav_active_item\" href=\"7.php\">Tests[/url]</li> <li><a class=\"sub_nav_item\" href=\"8.php\">ODIs[/url]</li> </ul>"; } elseif($page == "8.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_item\" href=\"5.php\">Fixtures[/url]</li> <li><a class=\"sub_nav_item\" href=\"6.php\">Rankings[/url]</li> <li><a class=\"sub_nav_item\" href=\"7.php\">Tests[/url]</li> <li><a class=\"sub_nav_active_item\" href=\"8.php\">ODIs[/url]</li> </ul>"; }} elseif ($page == "9.php" || "10.php" || "11.php" || "19.php") { $main_nav = "<ul id=\"main_nav_list\"> <li><a class=\"main_nav_item\" href=\"index.php\">Home[/url]</li> <li><a class=\"main_nav_item\" href=\"4.php\">Statistics[/url]</li> <li><a class=\"main_nav_active_item\" href=\"9.php\">GUESS[/url]</li> <li><a class=\"main_nav_item\" href=\"12.php\">Links[/url]</li> <li><a class=\"main_nav_item\" href=\"16.php\">FAQs[/url]</li> <li><a class=\"main_nav_item\" href=\"17.php\">About Us[/url]</li> </ul>"; if($page == "9.php"){ $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_item\" href=\"10.php\">Control Panel[/url]</li> <li><a class=\"sub_nav_item\" href=\"11.php\">Savings Market[/url]</li> <li><a class=\"sub_nav_item\" href=\"19.php\">Betting Market[/url]</li> </ul>"; } elseif($page == "10.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_active_item\" href=\"10.php\">Control Panel[/url]</li> <li><a class=\"sub_nav_item\" href=\"11.php\">Savings Market[/url]</li> <li><a class=\"sub_nav_item\" href=\"19.php\">Betting Market[/url]</li> </ul>"; } elseif($page == "11.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_item\" href=\"10.php\">Control Panel[/url]</li> <li><a class=\"sub_nav_active_item\" href=\"11.php\">Savings Market[/url]</li> <li><a class=\"sub_nav_item\" href=\"19.php\">Betting Market[/url]</li> </ul>"; } elseif($page == "19.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_item\" href=\"10.php\">Control Panel[/url]</li> <li><a class=\"sub_nav_item\" href=\"11.php\">Savings Market[/url]</li> <li><a class=\"sub_nav_active_item\" href=\"19.php\">Betting Market[/url]</li> </ul>"; } } elseif ($page == "12.php" || "13.php" || "14.php" || "15.php") { $main_nav = " <ul id=\"main_nav_list\"> <li><a class=\"main_nav_item\" href=\"index.php\">Home[/url]</li> <li><a class=\"main_nav_item\" href=\"4.php\">Statistics[/url]</li> <li><a class=\"main_nav_item\" href=\"9.php\">GUESS[/url]</li> <li><a class=\"main_nav_active_item\" href=\"12.php\">Links[/url]</li> <li><a class=\"main_nav_item\" href=\"16.php\">FAQs[/url]</li> <li><a class=\"main_nav_item\" href=\"17.php\">About Us[/url]</li> </ul>"; if ($page == "12.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_item\" href=\"13.php\">Live Matches[/url]</li> <li><a class=\"sub_nav_item\" href=\"14.php\">Video Highlights[/url]</li> <li><a class=\"sub_nav_item\" href=\"15.php\">Games[/url]</li> </ul>"; } elseif($page == "13.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_active_item\" href=\"13.php\">Live Matches[/url]</li> <li><a class=\"sub_nav_item\" href=\"14.php\">Video Highlights[/url]</li> <li><a class=\"sub_nav_item\" href=\"15.php\">Games[/url]</li> </ul>"; } elseif($page == "14.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_item\" href=\"13.php\">Live Matches[/url]</li> <li><a class=\"sub_nav_active_item\" href=\"14.php\">Video Highlights[/url]</li> <li><a class=\"sub_nav_item\" href=\"15.php\">Games[/url]</li> </ul>"; } elseif($page == "15.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_item\" href=\"13.php\">Live Matches[/url]</li> <li><a class=\"sub_nav_item\" href=\"14.php\">Video Highlights[/url]</li> <li><a class=\"sub_nav_active_item\" href=\"15.php\">Games[/url]</li> </ul>"; } } elseif ($page == "16.php") { $main_nav = " <ul id=\"main_nav_list\"> <li><a class=\"main_nav_item\" href=\"index.php\">Home[/url]</li> <li><a class=\"main_nav_item\" href=\"4.php\">Statistics[/url]</li> <li><a class=\"main_nav_item\" href=\"9.php\">GUESS[/url]</li> <li><a class=\"main_nav_item\" href=\"12.php\">Links[/url]</li> <li><a class=\"main_nav_active_item\" href=\"16.php\">FAQs[/url]</li> <li><a class=\"main_nav_item\" href=\"17.php\">About Us[/url]</li> </ul>"; } elseif ($page == "17.php" || "18.php") { $main_nav = " <ul id=\"main_nav_list\"> <li><a class=\"main_nav_item\" href=\"index.php\">Home[/url]</li> <li><a class=\"main_nav_item\" href=\"4.php\">Statistics[/url]</li> <li><a class=\"main_nav_item\" href=\"9.php\">GUESS[/url]</li> <li><a class=\"main_nav_item\" href=\"12.php\">Links[/url]</li> <li><a class=\"main_nav_item\" href=\"16.php\">FAQs[/url]</li> <li><a class=\"main_nav_active_item\" href=\"17.php\">About Us[/url]</li> </ul>"; if($page == "17.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_item\" href=\"18.php\">Feedback[/url]</li> </ul>"; } elseif($page == "18.php") { $sub_nav = "<ul class=\"sub_nav_list\"> <li><a class=\"sub_nav_item\" href=\"18.php\">Feedback[/url]</li> </ul>"; } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="author" content="1&1 WebsiteBuilder"> <meta name="description" content="A WebsiteBuilder Website"> <title><?php echo $page_title; ?></title> <link rel="stylesheet" type="text/css" media="screen" href="main.css"> <link rel="stylesheet" type="text/css" media="screen" href="colorschemes/colorscheme1/colorscheme.css"> <link rel="stylesheet" type="text/css" media="screen" href="style.css"> <script type="text/javascript" src="live_tinc.js"></script> </head> <body id="main_div"> <div id="container"> <div id="header"> <div id="main_nav_container"> <?php echo $main_nav; ?> </div> <div style="top: 50px; height: 274px;" id="key_visual"> </div> <div id="logo"> </div> </div> <div id="main_container"> <div id="left_column_container"> <div class="sub_nav_container"> <?php echo $sub_nav; ?> </div> <div id="sub_container1"></div> </div> <div id="sub_container2"> <div id="content_container" class="content"> <?php echo $page; ?> I tried changing all the main navigation "elseif"s to only "if"s...what happens? weirder things....only 17.php is active, but all the subnavigation bars are working. The website is guesscricket.com...look at it if u want to get a better idea of the main/sub navigation bars and the problem. Will be really helpful if someone can point out the mistake. Or I would appreciate it even more if someone can mention a better way of achieving what I am trying to achieve. Thanks guys...Will be waiting for ur reply. Just as a note...I am still a novice.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.