[PHP] Simple RegEx to pull out content between 2 markers

2008-03-29 Thread Jon Bennett
the contents of left, right and main individually so I can place them in separate form fields. Any help greatly appreciated. I'm certain this is a cinch for people who use regex often. Thanks, Jon -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett -- PHP General

[PHP] sorting multi array

2007-04-25 Thread Jon Bennett
/38) [quantity] = 1 ) [2552] = Array ( [name] = Havaianas Flash White [size] = 5 (37/38) [quantity] = 1 ) ) I need to keep the indexes if poss. Many thanks, jon -- jon bennett t: +44 (0) 1225 341 039 w: http://www.jben.net

Re: [PHP] Nested PHP

2004-02-02 Thread Jon Bennett
you can also do stuff like this... ?php if ($someVar == true) { ? html titlesomeVar appears to be true/title ?php } else { ? html titlesomeVar appears to be false/title ?php } ? Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative

Re: [PHP] Googlebot

2004-01-28 Thread Jon Bennett
: pdf, asp, jsp, hdml, shtml, xml, cfm, doc, xls, ppt, rtf, wks, lwp, wri. I notice php is not mentioned in this list, surely it can index php generated pages ?? Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e

Re: [PHP] Googlebot

2004-01-28 Thread Jon Bennett
is that it tends to avoid or downgrade URI's with parameters tacked onto the end. Does that go for internal links in your site then ??? news.php?start=10 etc ??? Could be tricky writing dyamic pages then. Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative

Re: [PHP] Function for crypt and decript.

2004-01-26 Thread Jon Bennett
http://uk.php.net/md5 Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: http://www.jben.net/ On 23 Jan 2004, at 09:55

Re: [PHP] Re: Flash-PHP Socket Connection

2004-01-21 Thread Jon Bennett
/ Good luck, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: http://www.jben.net/ On 21 Jan 2004, at 13:52, Donald Tyler wrote

Re: [PHP] Re: Flash-PHP Socket Connection

2004-01-21 Thread Jon Bennett
you might want to check out http://www.flash-remoting.com/ as well. There's also a book from oreilly. Cheers, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts

Re: [PHP] Non American strtotime

2004-01-16 Thread Jon Bennett
); $return = $aDate[1]./.$aDate[0]./.$aDate[2]; return $return; } hth, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: http

[PHP] dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
]; array_push($aListItems, $tempItem); ++$i; } print_r ($aListItems); but nothing appears to be added to the db, how can I access the $_POST vars within a loop ?? Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
Hi, Sorry for the double post, meant to say 'but nothing appears to be added to the array' not the db! Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
whilst trying to fix it but hadn't gone back to the very begining in my browser so my loop was looking for the wrong post names! Doh! Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91

Re: [PHP] Re: dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
Hi Ben, Sorry, it does work - so I can safely say you can concat the name of a associ array :-) Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
nice one, solves my next problem as well if any elements are empty! Cheers, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w

[PHP] best paractice example page creation php / mysql

2004-01-15 Thread Jon Bennett
??? I could just have an examples table with say 10 list_item columns and 10 x 2 table columns but that seems like a short cut really and leaves no room for scaleability. Any thoughts ?? Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative

Re: [PHP] best paractice example page creation php / mysql

2004-01-15 Thread Jon Bennett
. Is it ok to have INSERT statements enclosed in a while loop ??? Cheers, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: http

[PHP] convert date from UK to US for strtotime

2004-01-14 Thread Jon Bennett
?? What I really need is to re-order the string that a user inputs, say, 21/04/2004, so that it becomes 04/21/2004 so I can use strtotime. Cheers, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91

Re: [PHP] convert date from UK to US for strtotime

2004-01-14 Thread Jon Bennett
ok, got it: // converts a UK date (DD-MM-YYY) to a US date (MM-DD-) and vice versa function convertDate ($sDate) { $aDate = split (/, $sDate); $return = $aDate[1]./.$aDate[0]./.$aDate[2]; return $return; } Cheers, Jon jon bennett | [EMAIL PROTECTED] new media creative

Re: [PHP] related products, how to's best practices

2003-12-04 Thread Jon Bennett
Hi, Why should I not use drop downs ?? are they generally out of favour now ?? why ??? I ask because I was thinking of having each categories products listed in a drop down ! Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer

Re: [PHP] related products, how to's best practices

2003-12-04 Thread Jon Bennett
, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: http://www.jben.net/ On 4 Dec 2003, at 12:46, Richard Davey wrote

[PHP] related products, how to's best practices

2003-12-04 Thread Jon Bennett
, what I see as a problem is how an admin will select 3 out of 200+ products. Obviously a drop down is a bad idea, but so would a alphabetical list. has anyone got any insight into the best way to solve this. Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer

Re: [PHP] related products, how to's best practices

2003-12-04 Thread Jon Bennett
with google ?? Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: http://www.jben.net/ On 4 Dec 2003, at 14:57

Re: [PHP] related products, how to's best practices

2003-12-04 Thread Jon Bennett
and a dynamic dropdown for the products in that category, that would be much easier to repeat. Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14

Re: [PHP] how to determine if shopping cart has been abandoned?

2003-12-04 Thread Jon Bennett
why not only reduce the stock once a sale has gone through ??? Cheers, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225

Re: [PHP] file uploads

2003-12-02 Thread Jon Bennett
) ??? Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: http://www.jben.net/ On 1 Dec 2003, at 16:05, Jon Bennett wrote

[PHP] file uploads

2003-12-01 Thread Jon Bennett
have ftp'd into my local server and the folder in question is set at 777, and like I said it works fine if I don't use this class Any ideas ?? Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n

Re: [PHP] file uploads

2003-12-01 Thread Jon Bennett
move_uploaded_file($$_FILES[image][tmp_name], BASE_DIR./_img/_products/.$iProductId._.$fileName); } The above works fine, which I find very strange indeed! Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J

Re: [PHP] file uploads

2003-12-01 Thread Jon Bennett
the image details are there because otherwise functions like getimagesize would fail, it just won't save the resized or, if the dimensions of the uploaded image aren't bigger than my max width and height, original image, and I really have no idea why!! Thanks, Jon jon bennett | [EMAIL

Re: [PHP] Question on sending PhP variable results to an HTML page to be displayed.

2003-12-01 Thread Jon Bennett
Hi Al, I'd add a scrolling tag to your iFrame, as you won't ever need it to scroll. iframe width=550 height=25 scrolling=false marginwidth=0 marginheight=0 frameborder=0 scrolling =no src=cache.php/iframe hth Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer

Re: [PHP] file uploads

2003-12-01 Thread Jon Bennett
$aNewImage['image_loc'] = $aNewImage['image_dir'] . $aNewImage['new_name']; // does work!! $sImageLoc = '/Library/Webserver/Documents/wrox_site/_img/_products/' . $aNewImage['new_name']; Why oh why is that the case ??? Would love to know. Thanks, Jon jon bennett | [EMAIL PROTECTED] new media

Re: [PHP] file uploads

2003-12-01 Thread Jon Bennett
well I'll be dammed, that was it! Geeze, you look at something for so long sometimes you can't see the wood for the trees I feel so stoopid now! Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b

Re: [PHP] file uploads

2003-12-01 Thread Jon Bennett
or something ?? Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: http://www.jben.net/ On 1 Dec 2003, at 15:26, Jon

Re: [PHP] file uploads

2003-12-01 Thread Jon Bennett
sorry, made a mistake when writing my email: return = $aNewImage['new_name']; should be: return $aNewImage['new_name']; Cheers, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91

Re: [PHP] file uploads

2003-12-01 Thread Jon Bennett
Down't worry, it's sorted! Cheers, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: http://www.jben.net/ On 1 Dec