Jump to content

raw php in a ip gages page


Recommended Posts

Posted

how do i display this within a IP page

 

date_default_timezone_set("America/New_York");
$username="username"; // Mysql username
$password="password"; // Mysql password
$db_name="database"; // Database name

$tbl_name1="table"; // Table name


// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");

//fetch for members DB
$sql1="SELECT * FROM $tbl_name1 
WHERE date > DATE_SUB(NOW(), INTERVAL 24 HOUR) ORDER BY date DESC 
 ";
$result1=mysql_query($sql1);
}}
    							
					

<table width="400" border="1" cellspacing="0" cellpadding="3">
<tr>
	<td colspan="5">ATS Logs </td>
</tr>
<tr>
<td colspan="5">View last 30 days</td>
</tr>
<tr>
	<td>ATS User</td>
	<td>Action Type</td>
<td>Details</td>
<td>Performed On</td>
<td>Date</td>
</tr>
while($rows1=mysql_fetch_array($result1)){
echo "<tr>";
	echo "<td align='center'>".$rows1['atsuser']."</td>";
	echo "<td align='center'>".$rows1['actiontype'] . "</td>";
	echo "<td align='center'>".$rows1['details'] . "</td>";
	echo "<td align='center'>".$rows1['performed'] . "</td>";
	echo "<td align='center'>".$rows1['date']."</td>";


echo "</tr>";
}


</table>

 

Posted

Get this installed:

Create a Page, drag the widget onto the page, edit it and place your code in there as if it were a regular PHP file:

phpwidget.thumb.JPG.3fe6f15a2d7312801fb3

 

You're going to need clean up your PHP code though to get it to work.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...