wildteen88
-
Posts
10,480 -
Joined
-
Last visited
Never
Posts posted by wildteen88
-
-
You maybe able to override the php.ini setting using the ini_set function within your php scripts. Or using a .htaccess file using the php_flag directive
Example htaccess file
php_flag upload_tmp_dir /path/to/tmp/dir/ php_flag upload_max_filesize 50M
-
What does the function get_post_custom_values() return? What is the source code for that function?
You first need to understand what that function does and what type of data it is returning before trying to merge the two functions together.
-
-
ahhhh
but what if ive made 2 classes in the css to style the cells? as they should have a border bottom and also padding?
Then change
echo "<tr style=\"background-color: $bgcolor\">"; // apply the color to the row
to
echo "<tr class=\"$bgcolor\">"; // apply the class to the row
Now set the variables $color1 and $color2 to your two classes.
also, how would i display the full line of text including varibles in the one cell? in the code i posted it only is 2 varibles posted into 2 cells. I need the full sentence like the images i attached
thanks for ur help
Just place the text after your variables.
-
This is how you alternate colors
$i = 0; // initiate counter variable // set the colors $color1 = '#e1e1e1'; // first color $color2 = '#cccccc'; // secound color while($row = mysql_fetch_array($result)) { // alternate row colors $bgcolor = ($i % 2 == 0) ? $color1 : $color2; echo "<tr style=\"background-color: $bgcolor\">"; // apply the color to the row echo "<td>" . $row['firstname'] . "</td>"; echo "<td>" . $row['lastname'] . "</td>"; echo "</tr>"; $i++; // increment counter }
-
im trying to tell u that , that code doesn't work because it gives me a server error on the videos page
What error? It would be helpful if you tell us the exact error and on what line(s) it is occurring?
-
The following line passes the variable you pass to it by reference.
function CalculateRatios(&$ValueArray){
passing by reference is explained in the manual here
http://php.net/manual/en/language.references.pass.php
What is it you are trying to do?
-
What are you doing when your pattern matches the '$xxx[yyy]' string?
-
You have left off the curly braces
if($state == 'FL') { $price = $prices_array[$size]; // Set Price $tax = number_format($price * .07,2); // Set tax $amount = number_format($price + $tax,2); // Set total amount } else { $price = $prices_array[$size]; // Set Price $tax = number_format($price * .0,2); // Set tax $amount = number_format($price + $tax,2); // Set total amount }
-
Sort your code out so there is no output before the use of header(). Or use output buffering for a lazy fix.
Another option would be to set a html meta redirect or use JavaScript.
-
You don't use PHP to apply color to text within HTML tags. This is handled by client side language such as CSS. This is not possible with PHP at all. I have answered your earlier question which I moved to CSS Help, as it is the appropriate forum for your question.
This thread will be locked/removed soon so post all your replies here
-
WAIT!
Please read my post. Don't move!
I asked about color coding a specific word INSIDE of a menu, not the entire menu. I already know how to do that, and I wrote in my initial posting!
You can't colour individual words within <option></option> tags,
-
using header() returned an error
Probably because you have some form of output before the use of that function.
You cannot echo/print anything to the screen before the use of header().
-
-
try jQuery
Why?
You'd use CSS for this. You wont be able to color certain parts of text within the <option></option> tags. Example CSS
<select> <option value="large blue" style="color: blue">Large Blue T-shirt</option> <option value="large blue" style="color: Green">Small Green T-shirt</option> </select>
I'll move this to CSS help
-
You could reconstruct attack array so each attack level is holds an array of attacks. Example array structure
$array ( // level => array of attacks 4 => array('poison', 'tackle'), 6 => array('sleep powder'), 44 => array('giga drain'), // etc )
Then all you need to do to get the all the attacks for level 4 would be
if (isset($array[4])) { $attacks[] = $array[4]; }
-
-
What are you trying to do?
-
oopsi, i meant:
<?PHP $con = mysqli_connect('localhost', 'virtuala_test', 'password', 'dbname') ?>
That will work so long as the OP is using the mysqli library functions within their code. The functions for mysql and mysqli are not interchangeable. So if you're using mysqli_connect toconnect to mysql but use mysql_query to run a query it wont work.
-
The only way to pass both the $var2['DID'] and $var2['directory'] values would be as marcelobm suggested to you earlier
you could do something like:
echo "<option value='$var2[DID]_$var2[directory]'>$var2[directory]</option>";
and then in the script that receives the value use
$value_arr = explode("_",$value); and that will give you: $value_arr[0] = id; $value_arr[1] = path or directory];
That is the simple solution, the other solution is, when you get the id in the script that process the form, do a query with the id you get to retrieve the directory
To get the id and directory within the script that processes the form you'd use something like this
list($id, $directory) = explode('_', $_POST['id']);
-
Why not just do
list($newlastname,$newfirstname) = explode(', ',$row['full_name']);
Or (untested)
list($newlastname, $newfirstname) = preg_split('~,\s+~', $row['full_name']);
-
So you want to retrieve both the $var2['DID'] and $var2['directory'] values from the <select></select> field when the form has been submitted?
-
Your query is selecting all the rows within the dle_mylink table, and ordering the results by the size of the title in descending order (ie largest title to smallest title)
$SQL = "SELECT * FROM dle_mylinks ORDER BY LENGTH( title ) DESC";
If that table has 83000 rows then it'll return 83000 results. The while loop will iterate over the results 83000 times.
while ($db_field = mysql_fetch_assoc($result)) { $row['full_story'] = str_replace ($db_field['title'],"<a href=\"?newsid=" . $db_field['id'] . "\">" . $db_field['title'] . "</a>" ,$row['full_story']); $row['short_story'] = str_replace ($db_field['title'],"<a href=\"?newsid=" . $db_field['id'] . "\">" . $db_field['title'] . "</a>" ,$row['short_story']); }
The code within the while loop (between the curly braces { and } ) will be executed for every row the query is returned. So if your query returns 83000 rows then those two lines WILL be executed 83000 times.
After the while loop you have this line
$mydata =$row['short_story'] . $row['full_story'];
Here you are concatenating the $row['short_story'] and $row['full_story'] variables into one value and assigning that to the $mydata variable. The $mydata variable will only store the result from the very last row returned by your query. You are not doing anything with the previous 82999 rows, as the while loop will keep overwriting the $row['short_story'] and $row['full_story'] variables each time it processes the next row.
-
What code are you using to login the user. And what code are you using check if a user is logged in?
how to combine these 2 functions.
in PHP Coding Help
Posted
Then you probably need to use the resize function like so