Jump to content

dennismonsewicz

Members
  • Posts

    1,136
  • Joined

  • Last visited

Everything posted by dennismonsewicz

  1. Try this $postcommentq = mysql_query("INSERT INTO usercomments (from, to, comment, date, approve) VALUES ('$cookieid', '$getid', '$postcomment', NOW(), 'N')")or die(mysql_error()); if ($postcommentq) {
  2. try doing this to your postcomment var $postcomment = mysql_real_escape_string($_POST['postcomment']);
  3. are you getting any errors? Also, where is $getid being set at?
  4. here is my updated code... when i implemented this all of the backgrounds are white and not alternating... $row = 0; foreach($search_rows as $row) { $alt = ($row % 2 == 0)? 'ff0000' : 'ffffff'; echo '<tr>'; echo '<td bgcolor="#' . $alt . '">' . $row->branch_name . '</td>'; echo '<td bgcolor="#' . $alt . '">' . $row->address . '</td>'; echo '<td bgcolor="#' . $alt . '">' . $row->city . '</td>'; echo '<td bgcolor="#' . $alt . '">' . $row->state . '</td>'; echo '<td bgcolor="#' . $alt . '">' . $row->zip . '</td>'; echo '<td bgcolor="#' . $alt . '">' . format_phone($row->phone_number) . '</td>'; echo '</tr>'; $row++; }
  5. Hmmmm.... all that did was do the same thing it has been doing and set the whole table to one color. updated code: $row = 0; foreach($search_rows as $row) { $alt = ($row % 2 == 0)? 'd4e4fe' : 'bfd4f8'; echo '<tr>'; echo '<td bgcolor="#' . $alt . '">' . $row->branch_name . '</td>'; echo '<td bgcolor="#' . $alt . '">' . $row->address . '</td>'; echo '<td bgcolor="#' . $alt . '">' . $row->city . '</td>'; echo '<td bgcolor="#' . $alt . '">' . $row->state . '</td>'; echo '<td bgcolor="#' . $alt . '">' . $row->zip . '</td>'; echo '<td bgcolor="#' . $alt . '">' . format_phone($row->phone_number) . '</td>'; echo '</tr>'; }
  6. here is a good tutorial on appending things to a txt file http://www.tizag.com/phpT/fileappend.php
  7. I am having a difficult time in trying to get the alternating background color to work. foreach($search_rows as $row) { $numrows = count($row); for($i = 0; $i < $numrows; $i++) { if (($i % 2) == 0) { $alt = "d4e4fe"; } else { $alt = "bfd4f8"; } echo '<tr bgcolor="#' . $alt . '">'; echo '<td>' . $row->branch_name . '</td>'; echo '<td>' . $row->address . '</td>'; echo '<td>' . $row->city . '</td>'; echo '<td>' . $row->state . '</td>'; echo '<td>' . $row->zip . '</td>'; echo '<td>' . format_phone($row->phone_number) . '</td>'; echo '</tr>'; } }
  8. I got it working! I installed and setup proftpd and everything works smoothly! Now to another question... How do I set to where when a user logins they only see their directory? Instead of the main FTP directory?
  9. I am not 100% sure if this is the write forum or not but here goes... I have setup my Macbook with a virtual ubuntu distro using VmWare and setup Apache, PHP and the mysql server. Is there anyway to allow Ftp'ing into this virtual box?
  10. hey guys i learned a HARD lesson in chmod... I chmod'ed the usr folder (not thinking) and foo bar'ed everything so i had to reinstall and got everything working! Thanks for all yall's help
  11. I actually figured out how to do it but I am getting the following: #!/bin/sh /work/projects/liferay/tomcat/bin/ . startup.sh & I am receiving the following error: /work/projects/liferay/tomcat/bin/: Permission denied The second line of code above is to start the Tomcat service and is supposed to start the service and then boot up Firefox showing Liferay (An open source CMS built on JAVA). I have checked ALL the permissions on that particular folder (bin) and have even blown them wide open starting at the root dir of /work. Any help?
  12. I am moving on to writing some shell scripting and had a quick question. I need another script to run when my linux box starts up (or in case it goes down and I need to bring it back up) and I was wondering in my shell command how do I write something to tell another script to start?
  13. ah gotcha! Cool! I am loving this linux admin stuff!
  14. I understand what sudo does but what is sudo nano?
  15. Cool. I appreciate the help guys!
  16. I am wanting to learn some Linux Admin stuff. I understand a lot of linux and know how to navigate within linux. But I would love to learn how to do more. Any suggestions on a good book?
  17. well in the big scheme of things echo is a little faster when computing the code
  18. try this <?php $data1 = $_GET['data1']; echo $data1; ?>
  19. I have the following JSON: ([ {"name":"question me?", "answers":["Hello", "Testing"]} ]) and the following jQuery: <script type="text/javascript"> $(function() { //retrieve comments to display on page $.getJSON("javascripts/newdisp.js", function(data) { //create a container for each comment var div = $("<div>").appendTo("#jsonHere"); for (var x = 0; x < data.length; x++) { $("<label>").text(data[x].name).appendTo(div); } for (var z = 0; z < data.length; z++) { $("<div>").text(data[z].answers).appendTo(div); } }); }); </script> I am trying to get the individual answers to show up... and its not working lol... any help?
×
×
  • 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.