Jump to content

XAceX

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by XAceX

  1. WOO WHO!!! thanks guys it worked!
  2. Ok so this is probably a dumb question but like I mentioned im kinda new at PHP. Ok so say I wanted to put a background color on a row in my php table. How would I do that? This is what I have: <html><body><?phpecho "<center><b>Hello and welcome to the Tech Support Page. Here you can find simple and thourough instructions on the many different tasks you encounter day to day. This will be the source of help for those who don't know what to do or for those who have done it before but can't quite really remember that one detail and need a guide to go back and check..</center></b><br>"; echo "<center><table border=1>"; echo "<tr>"; echo "<td><span style=\"font-weight: bold;\">File</span></td>"; echo "<td ><span style=\"font-weight: bold;\">Date</span></td>"; echo "</tr></center>"; $current_dir="/applications/fgl/support"; //list all the files in current directory if ($handle = opendir($current_dir)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $full_file="$current_dir/$file"; $type=filetype($full_file); if($type=="file"){ echo "<tr bgcolor=white>"; echo "<td>$file</td>"; echo "</tr>"; } } } closedir($handle); } ?></body></html> Thats all I have so far. Now I know normally you would put the bg color code with the TD or TR like so: <tr bgcolor="red">or <td bgcolor="blue"> however since there is an echo it's not letting me use it. All I want to do is make the row that has the word file and the word date have a green background. Can someone help me?
  3. XAceX

    Sorting and Buttons

    Oh sweet! thank you so much. I cant wait to try it out.
  4. XAceX

    Sorting and Buttons

    WOW! Thanks!! This definitely helps a lot! I know how to put the files in an array that will put them in alphabetical order. Here is a screen cap of my list this will help me explain better.What I need is to make the word FILE into an active link. So if I click it once it sorts that list in alphabetical order. And if I click it again then it goes back. But you did give me a better idea of what im doing so thanks!!!
  5. XAceX

    Sorting and Buttons

    I'm pretty new to PHP up until now I only used HTML for any web stuff I work on. So I don't really have any code to post. But I do have a question. I run a tech support page at work and I'm supposed to use php what my boss wants me to do is find a way to organize this list of files that I post on there. What he wants is for me to post it as a list but have an active button that will sort it by alphabetical order if I click on it and if I click it again un-sort it back to the original state. I have no idea how to do that. Up until now I have just been reading up on PHP using W3 Schools. Can anyone help me. Do I even use php for that? do I use Java script? I dunno. :)
×
×
  • Create New...