-
Posts
4,362 -
Joined
-
Last visited
-
Days Won
11
Everything posted by Zane
-
get full array 1,2,3,..,11,12,13 with defining only one number
Zane replied to pioneerx01's topic in PHP Coding Help
$my_array = range(1, 13); or in your case, $my_number = 13; $my_array = range(1,$my_number); -
IMO, it should stay that way and if there was an FAQ, it would end up an application process.
-
No you didn't, you didn't use LIKE. The query should be $query = "SELECT * FROM users WHERE voornaam LIKE '$q%'";
-
Ok, let me rephrase the question. Where do you decalare $clientes_RS? Post that and the code around it.
-
There's a good tutorial on regular expression on the main site. http://www.phpfreaks.com/tutorial/regular-expressions-part1---basic-syntax
-
Ok, so from this code, I see that id_cliente is coming from $row_clientes_RS['id_cliente'] i.e an array called $row_clientes_RS Where's the query at for $clientes_RS
-
What does your form look like.. and how are you attempting to send this id right now?
-
Actually, that's really close to the syntax you would use for preg_replace's search pattern $description = preg_replace("#^Sl(.*)#", "$1", $description); That $1 stands for what is in the parentheses... everything after Sl
-
are you even sure that $_POST['id_cliente'] contains anything?
-
$email[] = array($_POST['id_cliente'], $_POST['cliente_email']); This is the wrong way to populate an array. This would make a multidimensional array. Another approach you can use, while still keeping the brackets is $email[] = $_POST['id_cliente'] $email[] = $_POST['cliente_email'] But if you really want to use the array function for a one-liner, then you'll have to ditch the brackets.
-
Fugix, if you knew anything at all, you would know it's just populating an array. the way he does it has nothing to do with the error he provided.
-
In your query, you are selecting the rows where voornaam = "the three letters or so". If you're only using the first three letters to query this, it's illogical to say you're looking for what equals those letters. For instance, if I wanted space to show up as a suggestion and I entered... spa, as my search criteria, I wouldn't be searching for "space" in my query. This is also why your query fails, which is why mysql_fetch_array fails. EDIT: just re-read the second quote. What you need to be using is the SQL comparison function, LIKE SELECT * FROM table WHERE voornaam LIKE "%spa%" Notice how I used the percentage sign. That is a wildcard. If you wanted to search the first letters you would take that first wildcard off. This is a 4 word search... using "spac" SELECT * FROM table WHERE voornaam LIKE "spac%" This would pull up things like, space spacious spackle ..etc
-
Crush the Castle 2 FTW.
-
I humbly beg your pardon! There is a ton of stuff in this forum that has nothing to do with the topic including a lot by admins, mods and gurus. If I had a gleaming I was breaking protocol you can be sure I would have never posted such. But you can be sure I will never address you again. No need to take offense man, I was just being honest. Although I know there are many threads that do go off-topic, I try not to advocate it. If it makes you feel any better, I'm on here now replying off-topic. If I offended you, then I apologize, but I wasn't trying to be an ass. I honestly think it's awesome that someone from Murphy is on here.
-
ATM, I have a landline and a Google Voice number that I generally forward to my landline. I think I'm like the cell phone rebel... without a cause.
-
I always wondered when I'd run into someone from this shithole. Yeah, I used to work at Rib Country in '05. .. regardless of it being cool to run into someone so close... within 7 years of phpfreak-ship, this has nothing to do with centering a DIV.
-
Cherokee County FTW
-
in order for margin: 0 auto to work, the width must be specifically set using a unit not a percentage; which is what cssfreakie just did in the above code.
-
http://code.google.com/apis/books/docs/getting-started.html
-
Wow, and you've had that avatar since 2003... or earlier.
-
Looks like I'm just gonna have to redo the entire front end.. unless I miraculously come across a fix for this bastard. It's probably better in the long run anyway, AJAX loaded content isn't exactly SEO friendly. Now I've got to ponder a better functionality. Also, BTW, Using IE Tab 2 , the page doesn't crash at all, but my LIs don't float to the left.. the just line up vertically but that's besides the point.. and irrelevant to this topic.
-
Yeah, I put it in debug mode just after I reinstalled IE8.. That is, if by Debug mode you mean to uncheck those two disable debugging checkboxes. Still, ieframe.dll pulls its shit and sometimes I get the Send Report dialog. If I click More Information I get about as much information as a Microsoft error usually gives you. The most irritating thing is that those temp files don't even exist.
-
The only thing I'm doing unique.. is that I'm populating an empty div.. dynamically, with a table...with jquery on click of an anchor link. Within that table I have CSS to highlight TRs when you rollover them. The oddest thing is that on the admin side, in IE... the tr.item:hover works perfect. When I try it on the main site.. IE crashes as soon as I hover over it. I've even tried the IE fix of changing the class of the TR on mouseover and taking it away onmouseout. It still crashes. I've never encountered this problem before. For all I know it could be an HTML validation error... Here in a second I'll create a separate account for the admin with restricted permissions so you can see that it works fine there. For now, you just gotta believe me that it works there.
-
I swear this has to be a JS problem, because most of the site runs off of jquery and its ajax functions. As always, the site works perfectly in Firefox, but when I load it up in IE7 or IE8 (I haven't tried IE9 yet) and start clicking the buttons, IE crashes. I'm clueless at this point. I've went as far as uninstalling IE8.. trying IE7; which still fails. Re-installing IE8 fresh and yet again, it still crashes. Meanwhile, I have an admin page with MUCH MORE jquery going on than the main page and it never crashes IE. I don't have a clue where this error is and IE doesn't give the most detailed of information. The most I get is that "the tab was recovered" or I'm redirected to a generic IE error page with this URL res://ieframe.dll/acr_error.htm#reallycheapfloors.com,http://www.reallycheapfloors.com/# I've ran malwarebytes, reimage, ccleaner, etc.. Contrary to what I though, there is nothing malicious floating around. In fact, this same thing happens on other computers running IE8.... and even 7. I'm assuming it's a coding error I've made somewhere, but I don't know of a good validator that can spot IE specific issues in code or else I'd be using that. Any help would be greatly appreciated.
-
assign $value as a reference in your foreach and it should work foreach ($result_array as $row) { foreach ($row as $key => &$value) { $value = html_entity_decode($value); // I would now need to replace the original $value in $result_array with the $new_value, but can't figure out how to do it?? } } Notice how I put an ampersand in front of $value in the second foreach. That will assign it by reference allowing you to change it on the fly.