dennismonsewicz
Members-
Posts
1,136 -
Joined
-
Last visited
Everything posted by dennismonsewicz
-
[SOLVED] Can't figure why my form is not inserting...
dennismonsewicz replied to pneudralics's topic in PHP Coding Help
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) { -
[SOLVED] Can't figure why my form is not inserting...
dennismonsewicz replied to pneudralics's topic in PHP Coding Help
try doing this to your postcomment var $postcomment = mysql_real_escape_string($_POST['postcomment']); -
try echoing out $q
-
[SOLVED] Can't figure why my form is not inserting...
dennismonsewicz replied to pneudralics's topic in PHP Coding Help
try echoing out your SQL command echo $postcommentq; -
[SOLVED] Can't figure why my form is not inserting...
dennismonsewicz replied to pneudralics's topic in PHP Coding Help
are you getting any errors? Also, where is $getid being set at? -
replace $get_info with $field
-
[SOLVED] alternating bgcolor on table rows
dennismonsewicz replied to dennismonsewicz's topic in PHP Coding Help
Awesome! This works! TKS! -
[SOLVED] alternating bgcolor on table rows
dennismonsewicz replied to dennismonsewicz's topic in PHP Coding Help
Bump -
[SOLVED] alternating bgcolor on table rows
dennismonsewicz replied to dennismonsewicz's topic in PHP Coding Help
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++; } -
[SOLVED] alternating bgcolor on table rows
dennismonsewicz replied to dennismonsewicz's topic in PHP Coding Help
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>'; } -
[SOLVED] Add item to a .txt file [Newby here]
dennismonsewicz replied to dennisvdz's topic in PHP Coding Help
here is a good tutorial on appending things to a txt file http://www.tizag.com/phpT/fileappend.php -
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>'; } }
-
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?
-
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?
-
If and Else If - is there a better way?
dennismonsewicz replied to y2yang's topic in PHP Coding Help
you could do a php switch -
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
-
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?
-
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?
-
ah gotcha! Cool! I am loving this linux admin stuff!
-
I understand what sudo does but what is sudo nano?
-
Cool. I appreciate the help guys!
-
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?
-
well in the big scheme of things echo is a little faster when computing the code
-
try this <?php $data1 = $_GET['data1']; echo $data1; ?>
-
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?