Search found 9 matches
- Sun Apr 26, 2009 7:52 pm
- Forum: PHP - Code
- Topic: trouble with closing a div in the right place using php
- Replies: 1
- Views: 127
Re: trouble with closing a div in the right place using php
nevermind I fixed it after walking away for a few mins. changed these lines Code:print("<div id='$divID3'><h4>".$div_header3."</h4><div class=height>"); //color print("<div id='$divID4'><h4>".$div_header4."</h4><div class=height>"); //desc and this one C...
- Sun Apr 26, 2009 6:51 pm
- Forum: PHP - Code
- Topic: trouble with closing a div in the right place using php
- Replies: 1
- Views: 127
trouble with closing a div in the right place using php
i need a </div> to go after every set of colors that belong to a vendor here's my php code: print("<div id='$divID'><h4>".$div_header."</h4>"); //vendor showData($relation_query, 3); print("</div></div>"); print("<div id='$divID2'><h4>".$div_header2."</...
- Fri Apr 24, 2009 10:20 pm
- Forum: PHP - Code
- Topic: Confusion with $_REQUEST array data
- Replies: 3
- Views: 119
Re: Confusion with $_REQUEST array data
have you tried if ($id !=$some_var) { // where $some_var = any condition you want myfunction($id,$myvals); } else { //display some error message or run another function } this will run your function if $id is not equal to what ever your condition is in $some_var I may be misunderstanding what...
- Fri Apr 24, 2009 8:04 pm
- Forum: PHP - Code
- Topic: stopping an array from clearing data after function call
- Replies: 3
- Views: 99
Re: stopping an array from clearing data after function call
added this line to the beginning of the fetch_all function and it's working perfectly
Code: Select all
mysql_data_seek($result, 0);
- Fri Apr 24, 2009 6:24 pm
- Forum: PHP - Code
- Topic: How do I stop a form submitting is there are blanks
- Replies: 2
- Views: 103
Re: How do I stop a form submitting is there are blanks
Code: Select all
if($_POST['field_name'] == "" ) {
//return error message
}
- Fri Apr 24, 2009 4:42 pm
- Forum: PHP - Code
- Topic: php form does not save in mysql
- Replies: 5
- Views: 147
Re: php form does not save in mysql
from first glance you've not supplied an action for the form. replace line 29 with this <form id="form1" name="form1" method="post" action="<?php $_SERVER['PHP_SELF'] ?>"> another thing I saw use the INSERT INTO instead of UPDATE (if these are new additions to...
- Fri Apr 24, 2009 4:08 pm
- Forum: PHP - Code
- Topic: stopping an array from clearing data after function call
- Replies: 3
- Views: 99
Re: stopping an array from clearing data after function call
"However, I'm confused on what you are doing with the row number. Really, you should only call this function once, collect the returned data, then you can do whatever you want with the array from there." with the row number 1($index) i'm accessing the names of vendors and with number 2 i'...
- Fri Apr 24, 2009 3:28 pm
- Forum: PHP - Code
- Topic: stopping an array from clearing data after function call
- Replies: 3
- Views: 99
stopping an array from clearing data after function call
i'm getting data from a table and I'm running it through a function to extract all the rows from each field. Here is the function: function mysql_fetch_all($result, $number) { while($row=mysql_fetch_array($result)) { echo $row[$number]."<br>"; $return[] = $row; } retu...
- Thu Apr 23, 2009 3:40 pm
- Forum: PHP - Code
- Topic: problem with posting to relational database
- Replies: 0
- Views: 60
problem with posting to relational database
i'm having a problem posting multiple color fields with image upload fields to a relational database (many to many). the user can enter multiple colors and upload a corresponding image (the colors and upload fields are added by the user when clicking a button) I have the code here for posting the co...