-
Posts
3,372 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Muddy_Funster
-
fair comment, but without knowing whether the mysqli library is enabled on someone elses server or not, it's probably better to stick with what flows their boat, rather than yours True that. ... I'm so egoistical :'( lol
-
Strict Standards: Only variables should be passed by reference in...
Muddy_Funster replied to dlc's topic in PHP Coding Help
cahnge +1 to -1 and see how it goes ( I keep getting confused when working backwards through a string...and with most other things in life..... ) -
gak, I missed out the /htdocs when I was trimming your url string echo"<img src=\"/wordpress_3/wp-content/plugins/Authors2/jackets/{$row['pix']}\" />"; this time - surely it must work! If it doesn't, please post the FULL url for the page that this code is on.
-
fair comment, but without knowing whether the mysqli library is enabled on someone elses server or not, it's probably better to stick with what flows their boat, rather than yours
-
Strict Standards: Only variables should be passed by reference in...
Muddy_Funster replied to dlc's topic in PHP Coding Help
my bad, malformed the code $file_ext = strtolower(substr($file_name, -(strpos($file_name, '.')+1))); -
You can't do that. The punctuation isn't the problem, the problem is that you are searching for either '%value%' or 'value%'. either way, your search string doesn't match the value in the table. It's nothing to do with punctuation. e.g. if you had 'Taco Bell' in your database and searched for 'Taco Belle' you would get nothing, nor would you get anything if you searched for ' Tacco Bell' or 'Taco Sell'. This is because the characters you are submiting in the string do not match the characters that are in the same postion in the strings that are already stored.
-
the comma just before FROM
-
Strict Standards: Only variables should be passed by reference in...
Muddy_Funster replied to dlc's topic in PHP Coding Help
yeah, looks like it should be spot on. How about trying this in place of it and see what you get? $file_ext = strtolower(substr($file_name), -(strpos($file_name, '.')+1)); -
That's all about MX records, and nothing about PHP. You will need to set the MX records in your domain admin to use your domain mail server as default. Process varies depending on hosting provider, You would be best contacting them if you are unsure.
-
Intergrating smarty and PEAR packages
Muddy_Funster replied to loooooooper's topic in PHP Coding Help
I have never seen paths start with ".;" before, is this an XAMP thing? -
Strict Standards: Only variables should be passed by reference in...
Muddy_Funster replied to dlc's topic in PHP Coding Help
Out of cuiosity, what do you get if you print_r($file_name) -
Foreach for iterating mysql result, or other alternatives
Muddy_Funster replied to wepnop's topic in PHP Coding Help
kind of - but it's non-standard practice, and you would need to be barking to use it in a normal scenrio. $result_set = array(); $resultset = mysql_fetch_assoc($result); foreach ($result_set as $field => $value){ //do what you want to do } using this kind of loop here is so bizzare I don't even know if that will actualy work -
Strict Standards: Only variables should be passed by reference in...
Muddy_Funster replied to dlc's topic in PHP Coding Help
what is $file_name? an array or a flat variable? -
are you certain that the problem is during the explode and not when the information is actualy being put into the array?
-
all you wanted to do to the echo was strip the stuff at the start out that you took of the address to make it work: echo"<img src=\"/Applications/MAMP/htdocs/wordpress_3/wp-content/plugins/Authors2/jackets/{$row['pix']}\" />"; should become echo"<img src=\"/htdocs/wordpress_3/wp-content/plugins/Authors2/jackets/{$row['pix']}\" />";
-
Total price from multidimensional array.
Muddy_Funster replied to rajaroy's topic in PHP Coding Help
No problem Roy. There are a good amount of people here who can associate quite vividly with this kind of scenario. If you've not been there already check out http://clientsfromhell.net/ -
what happens when you navigate to http://localhost/Applications/MAMP/htdocs/wordpress_3/wp-content/plugins/Authors2/jackets/****.***[code] where the stars are the file name of a know image?
-
Foreach for iterating mysql result, or other alternatives
Muddy_Funster replied to wepnop's topic in PHP Coding Help
while ($row = mysql_fetch_assoc($result)){ //do what you want for each row returned } is the normal way of doing this, so long as by iterate you are reffering to running through the returned result set from the query, and not to repeating the query it's self to obtain a specific result set. You see, it's still a bit ambiguous. -
Total price from multidimensional array.
Muddy_Funster replied to rajaroy's topic in PHP Coding Help
To be fair, you shouldn't really let guests add items to a cart anyway - if they want a cart they should have to log in. However, you could run a cronjob on the database that clears out any cart tables that have not been accessed for more than 24 hours. -
you're using select * three times (once is bad enough, but three times in a single query is inexcusable) you are aliasing table names for no good reason you don't have a single JOIN in your FROM clause even though you are supposed to have two of them other than that, it looks ok
-
Foreach for iterating mysql result, or other alternatives
Muddy_Funster replied to wepnop's topic in PHP Coding Help
could you try again, and maybe give us some more info? What do you want to do? -
Are you sure your case and path are accurate?
-
Total price from multidimensional array.
Muddy_Funster replied to rajaroy's topic in PHP Coding Help
It's not a problem with the explination, it's that you are writing a shopingcart to run through session variables stored in the PHP. That just stikes me as the wrong way to do things. I would have had it run from a database, but that's just me. I think you probably want a foreach(): $total = 0; foreach ($array as $key => $value) { $total = $total + $value; } but I could be way off, I don't use arrays too much. -
not sure if it's what you are looking for, bur strrpos() -- http://www.php.net/manual/en/function.strrpos.php -- should be able to help.
-
Total price from multidimensional array.
Muddy_Funster replied to rajaroy's topic in PHP Coding Help
I could be wrong, but something about this stikes me as fundamentally flawed...