-
Posts
14,780 -
Joined
-
Last visited
-
Days Won
43
Everything posted by .josh
-
Think maybe you mean to do this: $_SESSION['ServicesReqID'][] = $Bookings; and foreach($_SESSION['ServicesReqID'] as $k) { foreach ($k as $key => $value) { echo $key.$value; } }
-
You aren't showing him more functionality...you're showing him the same functionality as before, just changing the delimiter, which as far as I can tell, is not what the OP asked for...
-
my question is if you have access to that php file and it's hardcoded in a var like that...then why not just change how it's hardcoded in the first place?
-
I can't figure out how to convert a date from the database.
.josh replied to vetman's topic in PHP Coding Help
option 1: use date_format in your sql query option 2: use strtotime and date option 3: explode at the - and just concat the elements in the desired order. -
I do not have it turned off my server.
-
think i'd maybe wrap that in \b or \s depending on what the subject really is
-
[pre]OFF TOPIC___________________________________________________________________________________________________________[/pre]I like pie [pre]____________________________________________________________________________________________________________________[/pre]
-
so is this pcinfo.php a regular text file with space separated info for each line? You can use file to put all of the lines into an array and use explode with space as delimiter to separate each value from each line. Or you can use fopen and fread to read the file one line at a time.
-
could do this as a cheap hack:
-
http://www.phpfreaks.com/tutorial/php-basic-database-handling
-
document.getElementById('idhere').src = "path/to/image"; 'idhere' needs to be the ID used in the image tag (like <img id="idhere" src="..." .. />)
-
maybe it was your inability to post the right error and randomly not using code tags that threw people off...
-
: sigh : hopefully in the next 10 or 20 years companies will finally give up trying to fight how technology has progressed and start focusing on ways to make money off of selling things like services instead of trying to sue the little guy.
-
selecting results by postcode / longitude / latitude
.josh replied to scarhand's topic in MySQL Help
select location from table where (latitude between $latmin and $latmax) and (longitude between $lonmin and $lonmax) obviously you must replace the table, column and variable names with your own. -
YAHOO mail access via OUTLOOK 2002 fails with reported error (0x800CCC0F)
.josh replied to jasonc's topic in Miscellaneous
usually all of the major email providers offer instructions for accessing your email account via outlook. Have you looked at yahoo's help section? -
[SOLVED] Php script to dispaly database records in rows
.josh replied to JStefan's topic in PHP Coding Help
hmm... well what you had before works for putting the first row of results into $row, so if you were only expecting 1 row to be returned, then that should have worked. If it is now working by wrapping it in brackets, that means you got more than 1 row returned, and (at least) the first row returned has a bunch of empty/null cells... how about confirming this by rightclick > viewsource and seeing if you have a bunch of "extra" empty html tags.... -
After generating a notice, yes. Bah. Only mortals care about things like so-called "notices."
-
right. but if you go to that link, you will see that there are a lot of other functions in that library than just the ones you used. You can use them to achieve what you want. Or you know, you could just google for a php image cropping script...
-
You can use file to retrieve the contents of Inwine.txt. You can loop through each row with foreach, and use explode to separate the values. You can use sort or rsort to sort the array. max and min to find out highest and lowest prices. You can use array_sum and count to find out average price. You can use file_put_contents to put the info in Output.txt Good luck!
-
[SOLVED] Php script to dispaly database records in rows
.josh replied to JStefan's topic in PHP Coding Help
- you are not selecting petName from your db. - make sure your path/to/image is correct. You are using ../ which makes it look for the image in the directory above the script's directory. - does your 'image' value contain the extension, or just the image name? - Make sure the image actually exists, as well. - put this in your script: echo "<pre>"; print_r($row); does it show your expected values? You have a (!$res) condition that calls some custom function. What does that function do? simply echo the mysql_error()? because if the query simply didn't return any results, the function will get triggered, but there is no mysql_error() generated from a query that simply returns 0 results. -
first off, you do not need to use session_register. In fact, it's already deprecated and being removed as of php6. 2nd...what exactly is your overall goal here? I'm not really seeing the point of having the user enter in editable stuff in a form, only to turn around and let them edit it again... perhaps you can explain what you're trying to do on a more "top" level? Regardless though, what you have is technically right, minus the session_register which technically works but is superfluous and deprecated. edit: oh just noticed also you have the session var wrapped in quotes when you echo it. That is not necessary either.
-
you can do this with the gd library
-
as a best practice, yes. however, php will nonetheless parse them w/out the quotes.
-
Need Help With an If/Else Statement Please
.josh replied to richardk1's topic in Third Party Scripts
...or you could like, use a different delimiter so you don't have to worry about escaping... -
they do have a key. forum is parsing it as bbcode. I edited his post to wrap in code tags so you can see it.