dennismonsewicz
Members-
Posts
1,136 -
Joined
-
Last visited
Everything posted by dennismonsewicz
-
I have the folllowing code: <?php $field = mysql_num_fields($who_qry); while($row = mysql_fetch_assoc($who_qry)) { for($i = 3; $i < $field; $i++) { $names = mysql_field_name($who_qry, $i); $numbers = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 0); $title .= str_replace($numbers, '', ucwords($names . ',')); } } $excel=new ExcelWriter(); $explode = explode(',', $title); for($i = 0; $i < count($explode); $i++) { $pieces .= $explode[$i] . ','; } $trim = trim($pieces, ','); $myArr=array($trim); $excel->writeLine($myArr); ?> When it writes to the excel spreadsheet is placing all of the row names on one line i am guessing because the names are stored as one var instead of separate pieces of the array? Any ideas?
-
also make sure you close the <font> tag right before the <a> tag! </font></a>
-
Brandon: Your code will only remove the hyperlink in IE not firefox.
-
here ya go: <a href="http://www.technomed.co.uk" target="_blank" style="text-decoration: none"><font color=black>Testing hyperlink</a>
-
thanks for your help!
-
awesome! Can you delete this dir as well?
-
Is there a way when I upload a file to also create a folder with the file name?
-
How Many Of You Are Self-Taught Programmers/Developers?
dennismonsewicz replied to Vermillion's topic in Miscellaneous
Self Taught in PHP, CSS, MySQL, HTML, DHTML, Javascript, AJAX, XHTML and I know some ColdFusion (Though I cannot stand the technology and I think it needs to be dropped!) PHP ALL THE WAY! -
The graphic possibilities are endless with the PS3... the PS3 uses an 8 core processor! No one has yet to have the technology to use all cores... but oh it will come one day!
-
PHP Form is not sending all fields
dennismonsewicz replied to jamosdeyamos's topic in PHP Coding Help
Yeah I absolutely love this forum... its absolutely amazing! It has saved my butt quite a few times LOL! -
PHP Form is not sending all fields
dennismonsewicz replied to jamosdeyamos's topic in PHP Coding Help
you're missing a semi colon after the $message var -
PHP Form is not sending all fields
dennismonsewicz replied to jamosdeyamos's topic in PHP Coding Help
use $_POST Instead of $_REQUEST -
[SOLVED] <select> tag and php help plz
dennismonsewicz replied to Darkwoods's topic in PHP Coding Help
instead of using: mysql_fetch_assoc use mysql_fetch_array -
so it would turn this: <?php $arr = array("dog", "cat", "horse"); $ser = serialize($arr); echo $ser; ?> into this: dog, cat, horse
-
I have had these functions explained once, but I didn't necessarily understand the explanation... Can someone explain how these functions are used and what they are used for?
-
you could use an indexing script like this one: http://www.sphider.eu/index.php You need a DB tbl setup to run the actual program but it indexes your site instead of using a DB for the search to work
-
HOLY CRAP!!!! It works! Man HUGE KUDOS! I have been racking my brain for 6 days on this... thanks!
-
can you post the code you are working with?
-
but if i change the value to hidden the checkboxes will not be displayed on the screen
-
can you give me an example?
-
you could do a switch... http://www.tizag.com/phpT/switch.php the above URL has a good tutorial on how to use a switch. I use switches all the time when I am doing a edit/delete/add function in a custom CMS.
-
ok its really early for me lol... too many late nights burning the midnight oil! Gotta love pizza and Mt. Dew! What I am trying to do is this: I am printing out the checkboxes. And it checks the DB for a value of 1. If it is 1 then it checks the box. If it returns a 0 then it leaves the box unchecked. The reasoning behind this, is that I have built a custom CMS that allows project managers to go in an add/delete/edit projects and the checkboxes allows for the PM to see where a project is in the process. What happens is, is that a box is checked at a certain point in the project but if you go in and try to edit the checkbox and say, the PM made a mistake and the project isn't that far in the process and needs to try to backup and uncheck a box it is not updating the DB to set its checked value to 0. Make sense? I need it when a user unchecks the box to update the value in the DB with a 0 if it was a 1.
-
can you post more of your code
-
the $_GET var is a super var in PHP. It is used to retrieve values from the URL Example: If your URL looks like this: www.yoursitehere.com/page.php?id=54 You would use $_GET like this $id = $_GET['id']; The $_GET global retrieves the value of id
-
I have the following script that echoes out a checkbox like this: <?php $checkbox_qry = mysql_query("SELECT * FROM has_had_projects WHERE project = '" . $results->project . "'")or die(mysql_error()); $field = mysql_num_fields($checkbox_qry); while($row = mysql_fetch_assoc($checkbox_qry)) { for($i = 2; $i < $field; $i++) { $names = mysql_field_name($checkbox_qry, $i); $chk = $row[$names]==1?'checked="checked"':''; $numbers = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 0); $title .= '<div><input type="checkbox" name="checkboxes[' . $names . ']" class="checkbox" id="' . $names . '" ' . $chk . ' value="1" /> <label for="checkboxes[' . $names . ']">' . ucwords(str_replace($numbers, '', $names)) . '</label></div>'; } echo $title; } ?> Is there anyway to save all of the names in an array and when the form is submitted the script will traverse through the array and print out the names of the checkboxes that weren't checked?