-
Posts
4,362 -
Joined
-
Last visited
-
Days Won
11
Everything posted by Zane
-
Why do you need a space in the first place? Typically though, there shouldn't be a problem with spaces. But professionally, spaces are a no-no. Some questions to look over -------------------------------------------------------------- Are you sure you're form's method is set to POST? Are you sure you are POSTing to the correct page?
-
Here's a nice tutorial http://jan.kneschke.de/projects/mysql/order-by-rand/
-
SELECT * FROM table ORDER BY id DESC LIMIT 4
-
Preserving line breaks (Text Area insertation to MySQL)
Zane replied to wispas's topic in PHP Coding Help
look at nl2br() -
I would save for the 42". Because by the time you get your TV, most of what you have will be obsolete, but everyone wants a 42" TV. I'm not just talking about your computer here, I'm talking along the lines of how much your computer is worth. If times were to get tough and you were stuck with a 42" and that monster of a machine you got..I'd say you could get a good bit of money for it... much more than you would for speakers. I would also iinvest in an HDMI to DVI cable...
-
You don't download a tutorial. You read them.. and follow along.
-
http://www.tutorialized.com/view/tutorial/Send-email-using-the-PHP-mail-function/636
-
Why are you going this route again? Do you have a database that populates a CSS file? That is the only reason I can think of for using PHP to create a CSS file. If you really want to do this.. instead of eval I would look into the file editing functions like fwrite, fread, fget, etc
-
Undefined offset usually means about the same thing as undefined index. And an index is a key in an array. I noticed in your code you were setting $i to 1... and then adding 1 to it again before you ever even used it. Which would make the last ... loop's $i value... undefined. You also could have fixed the problem by putting the $i++ at the end of the loop.. and keeping $i = 1
-
I'm just gonna take a shot in the dark on this one, but change $i to 0 $allowed_tables = Array('tbl_table1','tbl_table2','tbl_table3'); // to prevent SQL injection $i = 0;
-
trying to insert a MD5'ed variable into a MYSQL table but cant
Zane replied to silverglade's topic in PHP Coding Help
variable names can't start with a number. -
I'm homocidal over a Tanooki suit. I hate Star Wars, then again.. I've never sat down and watched them. For the sole reason that the entire movie and its sequel's twist have been revealed to the public...ubiquitously. IOW.. I already know who Darth Vader's son is.
-
must be a good movie. I watched two people on Conan O'Brien promoting it that weren't even part of the movie. Ben Stiller being one of them, I figured it was just a joke on the movie, but the movie seems to be getting excessive hype. I've yet to jump on the bandwagon.
-
I got it. 2 votes a piece.. and the poll expires Friday. Though it looks horrible once you vote (just a warning)
-
I believe we'll need a poll for this type of thing.
-
I like #6...and #5 is decent too. Also, if orange is the new blue.... I'd go for the first color (#1) I would say that #4 looks good but for some reason it looks more like "colored/highlighted text" rather than a link. I got a feeling that people would see that and think of it as the new bold or something. But I'm all for changing the link color, I was bothered by it for awhile now and am glad someone else noticed it too, because I had forgot to even mention what I thought about it. @Norm.. why would you put Dan's "mini-profile" on the image as well.. Now the picture is too wide and most will have to scroll over.. I've fixed it for you.
-
I'll probably never use the button, but I'm glad as well that we have a PHP code button again. Good work Norm.
-
what do $xdoc1->challenge1 2 and 3 return anyway. Are you even sure they exist?
-
$grid_array = array( "A1" => "V", "A2" => "2", "A3" => "1", "A4" => "N", "A5" => "7", "B1" => "H", "B2" => "9", "B3" => "3", "B4" => "T", "B5" => "J", "C1" => "9", "C2" => "2", "C3" => "2", "C4" => "6", "C5" => "Y", "D1" => "N", "D2" => "1", "D3" => "R", "D4" => "8", "D5" => "K" ); foreach ($grid_array as $key => $value) { $id1 = $xdoc1->challenge1; $id2 = $xdoc1->challenge2; $id3 = $xdoc1->challenge3; $grid_array[$id1] = $response1; $grid_array[$id2] = $response2; $grid_array[$id3] = $response3; }
-
Form selection keeps opening a link on second attempt and onwards
Zane replied to Modernvox's topic in PHP Coding Help
Please don't PM me questions. As for your code... I don't see the form doing anything.. -
most likely the error is a line or so above that one. The line you posted looks fine. . nothing wrong
-
Undefined index error: Trying to pass variable to another page
Zane replied to abitlikehomer's topic in Javascript Help
This is a javascript question. if you want to have Form 1 "submit" to Form2 then you're not submitting at all. When you submit something... the page changes, unless you alter the onSubmit function. But you're not pushing submit after the dropdown selection, you're pushing it after the data has been retrieved (by a dropdown selection) and has been edited (if at all). Which is why having two forms kind of cancels itself out. Though having two forms isn't exactly necessary you can still get the job done with it. I guess it would ...keep it organized or something. something like document.forms.getForm.mySelectionbox.onChange = function() { //AJAX call to getNews.php?id=mySelectedbox.value //Then update the HTML elements in the form (or other form)\ //Something like document.forms.editForm.title = myajaxdata.title; } -
Exactly which line are you getting this error on? Because.. short of what premiso has already said, I see nothing wrong with your code
-
New 'Find some hosting boards?'
Zane replied to ChrisMartino's topic in PHPFreaks.com Website Feedback
In Miscellaneous here's a thread that's already been started for this http://www.phpfreaks.com/forums/index.php/topic,117475.0.html -
My first instinct would be to create an array of all the possible extensions you want to narrow down and create the file name (to be placed as the file_exists parameter) dynamically.....with a loop. So you'd loop through all 750k+ filenames and within that loop.. check for each extension using the extension array. psuedo-code $extensions[] = "bmp"; $extensions[] = "png"; $extensions[] = "jpg"; $extensions[] = "jpeg"; $extensions[] = "gif"; while($row = mysql_fetch_array($imageQuery)) { foreach($extensions as $ext) { $file2check = $row['filename'] . "." . $ext; if(file_exists($file2check)) echo $file2check . " exists! "; } } Though that method may be slow, it's the only thing that comes to mind at this point. There may be a faster way...using glob or some kind of regex matching, but it's up to you which method you want.