- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
avid gamer, web developer, out of the closet psychonaut & mind-expander, anti-authoritarian, libertarian, and free-thinker
- Interests
- technology, computers, games, rpgs, science, astronomy, physics, psychonautics, mind-expansion, psychedelics,…
- PC Specs
- server: debian, php 5.3, mySQL 5, apache 2, gd lib 2 pc: ubuntu 9.10
43 Posted Topics
Re: Haha.. I just found this kinda funny cause I saw this issue by someone else earlier today. I posted the cause and solution here: [url]http://www.daniweb.com/forums/thread286818.html[/url] Simply put, you have white space (the new lines outside of the closing and opening PHP tags) which is causing output data to be sent. … | |
Re: What exactly is your problem - that wasn't really clear. What is and isn't working, and what did you need help with? One thing I notice right off the bat is that it looks to me like you are echoing data out to the browser that you are probably intending … | |
Re: Here's a function I wrote long ago which should suit this purpose (I use it for generating random passwords, but it can be used for generating any random code): [CODE]function rand_pass ($length = 8, $seeds = null) { if ($seeds == '') { $seeds = 'abcdefghijklmnopqrstuvwxyz0123456789'; } $str = ''; … ![]() | |
Re: An alternative approach would be in mySQL's end; if you are familiar with using table indexes, then you might already know that it's possible to make multiple fields into a single index. This would allow you to have... say a field in the table named "ip" and another called "date"; … | |
Re: Well, typically this sort of thing is usually best left processed on the server-side, using a language like PHP as the page's data itself is generated. Are your pages even in PHP, Perl or some other sort of server-side dynamic language? If they are, then you basically could make a … | |
Re: If you can work with numeric IDs as well as the textual ID counterparts, then you can check out this function: [url]http://se2.php.net/manual/en/function.getmyuid.php[/url] There doesn't appear to be a function allowing you to retrieve the textual ID, but the numeric ID usually works in most scenarios - though obviously not for … | |
Re: Where is the rest of the code for this - like the code where you have the javascript alert(), and the actual code for the form itself? | |
Re: Have you tried something along this line: SELECT * FROM table1 as tbl1, table2 as tbl2 WHERE tbl1.column1 = tbl2.column1 && tbl1.column2 = tbl2.column2 I think that sounds like what you are talking about. | |
Re: Another way, which I actually believe to be the PHP recommended method, is to explicitly name your checkbox fields like this instead: <input name="chek[]" type="checkbox" value="x"/> Notice the added brackets; these trigger the data into an array, and this is actually how you are supposed to walk through check-boxes in … | |
Re: $results[] is basically saying "add an element to the array called $results" - it's like "pushing" an element onto the end of an array - well, it doesn't necessarily have to mean the end of the array if you are using associative arrays, but in short it is assigning a … | |
Re: I advise against the method posted by kokoro90. I have used it in the past and have found it to be unreliable in many scenarios. Imagine, for example that you are creating an image for each each of the IDs somewhere - let's say you are doing a banner ad … | |
Re: Being *inspired* by something is completely different than *copying* something. With that said, I disagree that open-source doesn't innovate. I think some of the greatest software accomplishments have come from open-source collaboration. If anything open-source evolves at a much faster rate than closed source because its guts are exposed to … | |
Re: Are you asking for help in building one, or asking if we know of one that already exists that doesn't use a database? If you want to build one without a database, you can use a flat file system (either a collection of many text files for each post, or … | |
Re: I have a free database and have written a class that localizes the client to their country (doesn't do cities or anything more specific than their country). If you'd like me to share it (freely) let me know. | |
Re: I would have to disagree that it definitely is not a problem with the query - I actually think that is the likeliest cause. The reason I believe this is because I've seen this warning many times myself, and it's always been something wrong with the query itself. If the … | |
Re: Hey there, I think the reason you haven't seen activity here lately may be because what I am also feeling a bit: confusion. I'm not entirely clear on what you mean with your request. What, specifically, are you trying to accomplish? Are you referring to text fields with the same … ![]() | |
Re: Well, the fact of the matter is even if you did use an .htaccess file to tell the web server to treat .html as shtml, it will still cause a performance hit to all .html pages since it will need to pre-parse the files to look for special codes. I … | |
Re: Here's an example: [CODE]$res = mysql_query("SELECT * FROM `table`"); $count = 0; $num = mysql_num_rows($res); while ($r = mysql_fetch_array($res)) { $count++; // echo some data: echo $r['something']; if ($count < $num) { echo "<hr/>"; } }[/CODE] | |
Re: Though I have never used these functions before, apparently PHP has had support for manipulating DOM elements for a while now. For example: [url]http://se.php.net/manual/en/domdocument.getelementbyid.php[/url] You should be able to use that function to get the content of the div based on its ID. There are also other functions to get … | |
Re: Have you tried using the word-boundary character in your regular expression? Like this: $suchmuster = "/\b".$textlinksname."\b/i"; That tells the regular expression that it only will match the given phrase if it is a isolated as its own word. In other words, it should catch google in this sentence: Google is … | |
Re: Are you referring to rows in a database, or HTML rows? | |
Re: A real simple and quick fix is to add this before you do the header(): ob_clean(); That cleans any output and will fix this in a snap. If you're concerned with figuring out the cause (and some people may think you should be), open up create_subjects.php and look around line … | |
Re: The "onsubmit" should be in the <form> tag - try that. If you want to catch the enter key being hit in a text field, you should use a function that checks the key being pressed on keyup/keydown, such as: function enterKeyHit (e) { if (e && e.keyCode == 13) … ![]() | |
Re: To what do you intend "this" to refer to in the body of MyError()? When using "this", it is usually a direct reference to the workable object itself, but unless MyError is a method of a class, it is not in an object context. Instead, do something like: [CODE]function MyError(msg) … | |
Re: Well, if the code you provided is what you're using, then the problem is simply that the "V" is capital in $tempVacany in the top code, but when you are putting it into the array you wrote $tempvacany - which is not the same thing. Can you verify that this … | |
Re: This is because Windows (stupidly) requires a file extension to know how to associate the file type (some other OSes don't do this, such as Linux/Unix). There is no way to tell you what program should open these files because you may have a bunch of "local" files that are … | |
Re: I have had problems with setting cookies in some versions of IE in the past, and I've discovered a few quirky things about how some browser do cookies. For one, by using the expiration argument, I was having issues with IE setting the cookie at all - I'm still not … | |
![]() | Re: Well, if you are using jQuery (and you said you are), you can do this: var test = $.get(url).responseText; ![]() |
Howdy, First off, I should say that I am jumping on posting this issue much quicker than I normally would - but I'm not really in a patient mood now, and I'm far from being a fan of anything the W3 has done. Anyhow, I am in the process of … | |
Re: The problem is pretty simple; this has to do with the quotes you are using. When you use single quotes, anything inside it is interpreted as LITERAL. In other words, if you wrote: $num = 3; echo 'I have $num apples.'; you would get: I have $num apples. Only use … | |
Re: No, I don't really think that this would make much of a difference, but maybe someone else disagrees with me. Well, let me cautiously instead say that I don't think it should be a big difference if you're only talking about a few hundred XML files that aren't ridiculously huge … | |
Re: One thing I can guarantee is that this has nothing to do with PHP, and everything to do with relative/absolute URLs, and how you are using them in your HTML code. For one thing, I am unclear on where this PHP code you are showing comes from - is it … | |
Re: You were going wrong here: ('$cellno','$Title[B]''[/B],'$FirstName','.... You accidentally wrote two single quotes side-by-side (right after $Title), which triggered a syntax error in your SQL statement. So there very well may have never been anything wrong with your use at all; it was just a small honest oversight - happens to … | |
Re: Change overflow: auto; to overflow: hidden; If this is for the main body/HTML of the page, it may not work in all browsers as it's kinda up to the browser if the scroll bar will always appear. Or was this not what you were referring to? | |
Re: First of all, I recommend filtering all data being sent through the SQL query to prevent 1) breaking the query, and, 2) SQL injections. Use this to escape any dynamic data going in the query: mysql_real_escape_string() [url]http://se2.php.net/manual/en/function.mysql-real-escape-string.php[/url] If there is a single quote in any of the fields (like $pro_name, … | |
Re: The problem is that any additional JavaScript code returned will NOT be evaluated. I've run into this problem a few times myself; there are workarounds, such as an example found here on an old thread: [url]http://www.daniweb.com/forums/thread53137.html[/url] .. But I honestly believe the best bet is to not rely on evaluating … | |
Re: Is this a SELECT or an UPDATE? This is important to know. If it's a SELECT, you shouldn't be separating the conditions with commas, but instead " && ". If it is an update it is fine. Either way, what is with this part: 'AZEEZ', [B][U]surname= 'JIBRIN'= 'AJIM'[/U][/B], password= 'JUG" … | |
Re: Now I could be wrong with the actual cause of your problem here, but what I do know is that the ampersand has special meaning in most contexts (including .htaccess, PHP and in page URLs). Its literal use should be avoided because when you use it in a URL, the … | |
Re: Sorry, but I am a little unclear on what exactly your problem here is. What is the key issue you are facing? Is this code here not working? Do you want to convert this to storing the options in SQL? I didn't quite get what you meant. A couple things … | |
Re: You definitely can, and in my opinion: you SHOULD in most situations. The reason I say you should in many situations is because you may be using less memory by not storing the result of the function call in a variable and just checking it in a condition right off … | |
Re: Have you tried using PHP's strip_tags() function? [url]http://se2.php.net/strip_tags[/url] You might also send the text through another function you create yourself to remove things like " " | |
Re: In PHP ob_clean() is useful for flushing output headers, though I suspect that in this context they aren't really headers for PHP at all, but in PHP's context text that is passed as headers to the email service. Are you able to provide any or all of the code for … | |
Re: In your rewrite rule, have you tried to escape the forward slash, like so: RewriteRule ^([^-]*)-([a-zA-Z0-9\/_-]+[^.]+)$ product_info.php?catname=$1&itemno=$2 [NC] That could do it - I can't say for certain since I don't believe I've ever used forward slashes in rewrite rule regular expressions, but I do know that in most languages … |
The End.