Jump to content

web.dork

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

web.dork's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Right.. I've figured out that much, but either way AFAIK, the export display statement controls the display issue, only it _isn't_ :/
  2. I have this same problem and would VERY much appreciate some insight!
  3. As a testbed, I'm trying to develop a PHP GUI for a Linux computer - the GUI is a webpage that is run on the local machine. From this GUI, I want it to be able to launch shell scripts that I have written which are on the same machine. The problem that I am facing is that I can't figure out how to launch these scripts outside of the browser, as it is unable to open a display. I have tried to create a shell script for the PHP to call, such as: export display=localhost:0.0 xterm & with no success of launching the application, as there is still a display problem. So keeping in mind that this entire GUI is for the local machine, how does one launch an application such as this example from a browser?
  4. PERFECT AND SOLVED! .... you da' man of the hour MT!!!! Many thanks
  5. Question.... Let's say I have a MySQL database with a field names 'Status'; this field only has two possible results, 'Active' and 'Inactive'. When the query is made and the results for the rows are pulled into preformatted tables I have coded, what is the correct way to CSS color the text, Red for Inactive and Green for active? I have a linked CSS to the results page, so should I create a CSS class and somehow construct an equality statement in PHP for the var $row[status], like to check if it is either literally 'Active' or 'Inactive', and then assign new vars with the appropriate class name to precede the text? My code: <? require ('login555.php'); //$sql = 'SELECT * FROM `Clients` ORDER BY `Clients` . `lastupdated` ASC LIMIT 1 '; $query = mysql_query("SELECT * FROM Clients ORDER BY id DESC"); echo "<link href=styles/main_style2.css rel=stylesheet type=text/css />"; echo "<center><table width=800 class=form_bg><tr><td width=100 class=w_txt>ID #</td><td width=100 class=w_txt>Last Name</td><td width=100 class=w_txt>First Name</td><td width=100 class=w_txt>Rep</td><td width=100 class=w_txt>Hours</td><td width=100 class=w_txt>Status</td></tr></table></center>"; while ($row=mysql_fetch_array($query)) { echo "<center><table width=800 border=1>"; echo "<tr><td width=100px><a href='http://www.mysite.com/query.php?id=$row[id]'>$row[id]</a></td>"; echo "<td width=100><div align=left class=main_txt>$row[lastname]</td></div><td width=100><div align=left class=main_txt>$row[firstname]</td></div><td width=100><div align=left class=main_txt>$row[rep]</td><td width=100><div align=left class=main_txt>$row[hours]</td></div><td width=100><div align=left class=main_txt>$row[status]</td></div></div></tr></table></center>"; } mysql_close($link); ?>
  6. Sweeeeeeeet! Worked like a charm!!!! Many thanx Liam.... now I'll be able to sleep tonite (eventually)...
  7. BTW... here is some of my code.... <? $hostname="myhost.com"; $u="myuname"; $p="mypass"; $db="mydb"; $link = mysql_connect($hostname,$u, $p) OR DIE ("Unable to connect to database! Please try again later."); if (! $link) die("Couldn't connect to MySQL"); mysql_select_db($db , $link) or die("Couldn't open $db: ".mysql_error()); $result = mysql_query( "SELECT * FROM `Mytable` ORDER BY `Mytable` . `lastupdated` ASC LIMIT 0, 30" ) or die("SELECT Error: ".mysql_error()); $num_rows = mysql_num_rows($result); print "<center><table width=800 border=1><tr><td><font face=arial size=2/>Full List</td></tr></table></center>"; print "<center><table width=800 border=1>\n"; while ($get_info = mysql_fetch_row($result)){ print "<tr>\n"; foreach ($get_info as $field) print "<td><font face=arial size=2/>$field</font></td>\n"; print "</tr>\n"; } print "</table></center>\n"; mysql_close($link); ?>
  8. 1:30am and I'm stumped... So I've created a database that has the following fields: id (int) lastname (varchar) firstname (varchar) etc etc I'm able to query the DB and produce the FULL field list results as I need them (in DESC order), but my question is how do I generate the field 'id' into a hyperlink that will be formatted as mysite.com/query.php/id=(id number)? Any help would be greatly appreciated!
×
×
  • 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.