Jump to content

jefffogel1974

Members
  • Posts

    11
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://www.xtremetab.com

Profile Information

  • Gender
    Not Telling

jefffogel1974's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi Dale, yes it displays the text "Got 219 access points from DB." Ch0cu3r yes if I remove the ping command it does list all access points in a nice table format, so seems like something in the ping command is stopping it from displaying all AP's??
  2. Ch0cu3r that worked very good thank you, but it only displays 1 table row, how would I loop it through to ping each AP in the database?
  3. Why can I not edit my post to remove this?
  4. Already did after I realized my mistake, thank you!!
  5. I am either not pasting the correct code into the right area or it just doesn't work because now I get a blank page when I try and view the webpage. This is the whole code of what I did below. <?php $con=mysqli_connect("192.168.1.158","jfogel","Slave123","aps"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $result = mysqli_query($con,"SELECT * FROM aps"); echo "<table border='1'> <tr> <th>ID</th> <th>Site</th> <th>AP Name</th> <th>IP Address</th> <th>MAC Address</th> <th>AP Location</th> <th>Status</th> </tr>"; while($row = mysqli_fetch_array($result)) $str = exec("ping -n 1 -w 2000 $row['IP_Address']", $input, $result); if ($result == 0){ { echo "<tr>"; echo "<td>" . $row['ID'] . "</td>"; echo "<td>" . $row['Site'] . "</td>"; echo "<td>" . $row['AP_Name'] . "</td>"; echo "<td>" . $row['IP_Address'] . "</td>"; echo "<td>" . $row['MAC_Address'] . "</td>"; echo "<td>" . $row['AP_Location'] . "</td>"; echo "<td>" . $row['echo "Online"; }else{ echo "Offline"; } '] . "</td>"; echo "</tr>"; } echo "</table>"; mysqli_close($con); ?>
  6. Thank you guys for the suggestions. Dale the left editor is just another script I found that can ping an IP address but I can only get it to work if I statically assign the IP address, I actually want the script to loop through what is displayed from my right side editor and display Offline/Online status. Abra, I really like your idea, but I am such a noob with PHP/MySql that I am unsure how to put the ping.php code into a while loop and was wondering if you could show me this? Thanks again you guys for your help!!!
  7. Keep in mind I am a PHP/MySQL noob, but my boss has tasked me with a project knowing I don't know coding to well. Here are the details. We currently have a building that has 20 some Cisco Wireless Access Points and all have an IP address assigned to them. I need to create a webpage that will pull the data I have from MySQL and display it in a nice HTML table layout. This is not the problem and I have completed this part thanks to a script I found online. The problem I am running into is my boss would like the script to grab the IP address of each access point from the DB and ping it and if it is down he would like it to display the words OFFLINE next to that AP in the HTML table. If the AP is up he would like to have it display ONLINE in the table next to the AP. If anyone can lend some assistance to a total noob I would greatly be in your debt. Thank you for everyone that assists!!!
  8. I have a MySQL db with all my servers and all their details like server name, IP, OS, RAM etc etc 26 in total. I have a PHP page which will list all server names with a link on the page and when you click the link its suppose to go to a page that is called serverdetails.php which it does, but how do I only list information from the one server of the link I clicked on? Below is the code I am using to go to the next page. echo "<A HREF=\"http://vm-webdev/serverdetails?svr={$row['Server_Name']}\">{$row['Server_Name']}</A><br>";
  9. I am working on my website and have a question about a PHP search box. On my songlist.php page I would like to print the name of the band above the list of songs. Any suggestions on the code? I would also like to have a search box working at the top of the page where if someone typed the name of the band it would bring them right to the songlist.php of that band. Take a look at the link below to see what I have so far. http://www.xtremetab.com/tablature-tab-list-0.php Any suggestions you have would be great. Thanks
  10. Hi Joel Once I put in the $songCount = mysql_num_rows($_sql); on line 17 it returns errors, check out the page below. http://www.xtremetab.com/tablatureDB/test.php Am I missing something?
  11. I am building a web application that list band names in the right column and in the left column the number of songs in my DB for each band. But I cant get it to work correctly. Can anyone help with this and let me know what im doing wrong in the code. URL http://www.xtremetab.com/tablatureDB/test.php Code <?php $data = mysql_query("SELECT DISTINCT AllBands FROM Allsongs WHERE SUBSTR(LCASE(AllBands),1,1) = LCASE('1') ORDER BY AllBands ASC LIMIT 1,50"); echo '<table width="100%">'; echo '<tr><td>Artists:</td><td># of songs:</td></tr>'; while($result = mysql_fetch_assoc($data)){ $_sql = mysql_query("SELECT DISTINCT(AllSongs) as SongCount FROM allsongs WHERE AllSongID='".$result['AllSongID']."'"); $count['SongCount']; echo '<tr>'; echo '<td>'.$result['AllBands'].'</td>'; echo '<td>[ <strong>'.$count['SongCount'].'</strong> Songs ]</td>'; echo '</tr>'; } echo '</table>'; ?>
×
×
  • 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.