#php
10 November 2007
Total 28 pages. You are browsing page 1/28.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Sat Nov 10 00:00:10 2007
--- Day changed Sat Nov 10 2007
00:00 <****> pbowyer: even php.net/xpath?
00:00 * Slynderdale curses Wolfy and makes his pants flame retardent
00:01 <****> Slynderdale: You fail. Asbest pants XD
00:01 <****> Wolfy[drawing]: no, didn't see that in the chapter listings :)
00:02 <****> Wolfy[drawing]: php.net/xpath does not exist
00:03 <****> it's now all in the DOM module
00:03 <****> myes.
00:16 <****> So I run a mysqli query and then I fetch array on the result object and store that array into my object.
00:16 <****> the problem is if I do a foreach loop on that array every value that I pulled from the database is in there twice once with a key of 0 1 etc and one with a key of title content etc.
00:16 <****> how to fix?
00:17 <****> use the right access method
00:17 <****> Meaning?
00:17 <****> it is possible to ask for only one of those index methods
00:18 <****> mysqli_fetch_Assoc for example
00:19 <****> AHA you are teh win.
00:19 <****> or do try the fancy binding system
00:19 <****> you will need to use it when you start with prepared queries anyway
00:19 <****> I don't even know what you are talking about assoc array worked
00:20 <****> the whole idea here is to make a database object class that will take an id and a table and fetch everything out in there for you.
00:20 <****> I am talking about advanced things
00:20 <****> right
00:21 <****>data that is an array containing all of the information for that individual post or whatever.
00:21 <****> mysqli_stmt::bind_param for example
00:21 <****> with it, there is no need to use mysqli_real_Escape_string
00:21 <****> I see
00:34 <****> how are uploaded files saved?
00:34 <****> !+file-upload
00:34 <****> Uploading files with PHP, the 101 version: http://www.php.net/features.file-upload
00:34 <****> stop
00:34 <****> Read it. Again.
00:34 <****> ive been there
00:34 <****> start reading
00:34 <****> am i meant to use preg_match() to validate form fields ?
00:35 <****> the question isnt really answered there or on any related subjects
00:35 <****> but thanks Wolfy
00:36 <****> serbz[dv]: I use formchecket::isName()
00:36 <****> TAseth: Actually, it is.
00:36 <****> i know they are put into the tmp directory
00:36 <****> the default directory if none is specified
00:36 <****> DUH!
00:36 <****> TAseth: That's exactly why you should READ the WHOLE page.
00:37 <****> formchecket::isName() what is this?
00:37 <****> serbz[dv]: It's how I do it.
00:37 <****> i have a bunch of vars that have a value of "true" or nothing..the ones that aren't true, i want to change to false. is there an easy foreach loop i can do to change them all at once?
00:38 <****> but what is that? isName() isnt a function?
00:39 <****> what's the environment var for everything after the server name
00:39 <****> it's a method
00:39 <****> $_SERVER
00:40 <****> ok so for instance if I don't want to upload the file unless the user finishes the form then I just match the uploaded file in the tmp directory and delete it?
00:40 <****> the form is multi page using sessions
00:41 <****> Wolfy[drawing]: domain.com/this/is/what/i/want
00:42 <****> $_SERVER
00:47 <****> TAseth: read what the page says. Including the linked ones.
00:49 <****> Wolfy[drawing]: so can $_files be used similar to $_Session?
00:49 <****> how would i direct all requests to one index file? and will i still be able to grab what url the user originally typed?
00:49 <****> how can i make an array of images??? so they can me swaped in the html for expecific acction?
00:50 <****> TAseth: Um./ No. Read the manuals.
00:50 <****> diator: glob
00:50 <****> Wolfy[drawing]: I am, it says nothing about that
00:51 <****> Wolfy[drawing]:http://www.php.net/manual/en/reserved.variables.php#reserved.variables.files
00:51 <****> TAseth: you're badly wrong
00:51 <****> umm ty Wolfy[drawing]
00:52 <****> TAseth: IIRC, I *did* say you should read the linked pages as well.
00:53 <****> johnny5: index.php?p=about ; index.php?p=links ; index.php?p=affiliates
00:53 <****> johnny5: then look up mod_rewrite on google to get the URLs you want
00:54 <****> mod/shmod rewrite
00:57 <****> so nobody knows how to escape a string?
00:57 <****> for regex
00:57 <****> just use backslashes...
00:58 <****> php.net/preg_quote
00:58 <****> http://www.php.net/manual/en/function.preg-quote.php
00:58 <****> oops... Wolfy[drawing] put it there already
00:59 <****> it's called "knowing the manuals" :3
01:00 <****>error always ends up being nothing why? http://pastebin.ca/767727
01:00 <****> TAseth: http://www.w3schools.com/php/default.asp read the advanced thingy
01:01 <****> diator: thanks
01:02 <****> diator: so there is no way to hold the file "in memory" because once the script is over the tmp file is gone?
01:03 <****> TAseth: Why would you even want to hold the file in memory?
01:03 <****> yeah thats the porpouse of the HD lol
01:04 <****> Wolfy[drawing]: it was a theoretical statement
01:04 <****> Wolfy[drawing]: i want to have a file selected and entered, but only uploaded if the entire form is completed and submitted
01:05 <****> They should release a php tablet
01:05 <****> where you take it
01:05 <****> and know php
01:05 <****> no need to learn
01:05 <****> that would be useful
01:05 <****> it exists. It's called "reading"
01:05 <****> tablets dont take time
01:06 <****> serbz[dv]: flash drive for the brain
01:06 <****> sure they do. One more than others
01:06 <****>error
01:06 <****> PHP 4 dummies?
01:06 <****> "this version of PCRE is not compiled with PCRE_UTF8 support". Anyone?
01:07 <****> Wolfy[drawing]: get what I am saying now?
01:07 <****> so u want the client to upload a file to server side?
01:08 <****> TAseth: I hoped you'd figured it by now...
01:08 <****> !+u
01:08 <****> Surely you mean 'you', not 'u'? The letter 'u' is not a personal pronoun. Talking like this in ##php may get you silenced. For details, /msg php-bot aolbonics
Total 28 pages. You are browsing page 1/28.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
