8,966 Posted Topics
Re: Yes, you can mix it. Of course, said code will be easier to use/understand, when you understand how OOP works. That is best achieved by actually using it yourself. Personally, I am a big fan of OOP, but for small PHP scripts I think it's overkill. That may also be … | |
Re: Why not create a class ecapsulating your array. You can do the read from file in the constructor, and allow only read access to the array property. | |
Re: [QUOTE=OsaMasw;1734610][B]Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Input is not proper UTF-8, indicate encoding ! in Entity, line: 22 in C:\AppServ\www\datap\test.php on line 21[/QUOTE] As the error states, you need to set the correct [URL="http://www.php.net/manual/en/class.domdocument.php#domdocument.props.encoding"]encoding[/URL]. | |
Re: Comments in PHP are the following: [CODE] # single line comment // single line comment /* multi-line comment */ [/CODE] [code=html] <!-- this is a HTML comment and not valid for use within PHP tags as on line 7 of your example --> [/code] | |
Re: [QUOTE=justzamir;1741775]ok getting same error [/QUOTE] Compare with the previous example. Am positive you can fix this yourself. Look at the quotes. | |
Re: The first is in flash, the second in jquery (try [URL="http://jquery.malsup.com/cycle/pager-over.html"]this one[/URL]). | |
Re: [CODE=text] %GETVALUE(\d+)% [/CODE] I suggest you have a look at [URL="http://php.net/manual/en/function.preg-replace-callback.php"]preg_replace_callback[/URL]. It will make this a lot easier. | |
Re: I don't think it is, because for example [iCODE]$prev[/iCODE] is set but never used. | |
Re: Try [URL="http://www.thumbalizr.com/"]this one[/URL], just be sure to cache the results on your server. | |
Re: Looks like it should end with this [iCODE]/Position2D/Value2/C2[/iCODE] (Based on this) [CODE=xml] <WhereWhen> <ObsDataLocation> <ObservationLocation> <AstroCoords coord_system_id="UTC-FK5-GEO"> <Position2D unit="deg"> <Value2> <C2>-9.0739</C2> [/CODE] | |
Re: IMHO using jQuery is the simplest way, there are a lot of [URL="http://www.dynamicdrive.com/forums/showthread.php?t=56899"]examples[/URL] to be found. | |
Re: Did you use [URL="http://tokenposts.blogspot.com/2011/05/jquery-datepicker-disable-specific.html"]this method[/URL], where you direct the request to a function ? Next to that, the datepicker has a refresh method, which should reload all settings. | |
Re: Which server are you using, because you cross-posted in MySQL and MSSQL ? | |
Re: This is too vague, try again with an example of what you want, and the code you have so far. | |
Re: If your traffic gets high, then I really advise you to take ardav's route with the limit, and query the table again for a count. If you don't, you will get an enormous performance breakdown, because you are allocating huge amounts of resources that never will be used. ![]() | |
Re: Javascript function parameters are untyped. 'int' in your case is the name of the variable, not the integer type. | |
![]() | Re: See example #4 in [URL="http://php.net/manual/en/function.mail.php"]the manual[/URL]. |
Re: There is no error handling for the query in posts (it fails). Compare with what you have in your login, because that is much better. | |
Re: [url]http://www.gen-x-design.com/archives/create-a-rest-api-with-php/[/url] [url]http://stackoverflow.com/questions/4684075/how-to-build-a-restful-api[/url] (very basic example) Depending on what you need to build, I can give you the code of a small test api I wrote (api.pritaeas.net). | |
Re: You should use curly brackets instead of parenthesis: [CODE] RewriteCond %{REQUEST_FILENAME} !-f [/CODE] | |
Re: If you really want to pursue this (I've had colleagues in this business), what I recommend is learn about user experience too. [url]http://ux.stackexchange.com/[/url] | |
Re: Again, you have to give [iCODE]empname[/iCODE] a value first. | |
Re: Can you also show your table structure, including keys/indexes ? | |
Re: Well, _$POST should be $_POST. But that should not display your code. Are you absolutely sure PHP works ? If you make a file call phpinfo.php with this in it: [CODE] <?php phpinfo(); ?> [/CODE] What does it show ? | |
Re: Each one needs to have an onChange to fill the next dropdown, each time needing the values from the previous dropdowns. In the most basic form, every dropdown has it's own onChange function, that calls a different PHP file on the server. | |
Re: If the date you mean is in your database, then you can just use a query. | |
Re: Instead of array_push you can just do: [iCODE]$yourarray[$index] = $value;[/iCODE] If the $index already exists, it will overwrite, but you can check for that if you don't want that to happen. | |
Re: Your idea should work just fine. Perhaps there was just an error in your code somewhere. Am not quite sure what you are expecting from HTML5 to do differently. | |
Re: So what part are you having problems with ? Surely a web developer should be able to solve this. | |
Re: You output [iCODE]Day[i][/iCODE] which is defined as an [iCODE]array[1..7][/iCODE], but the loop runs from 1 to 31. | |
Re: Post your form (action) to a PHP file, and that must have code to perform the connection and query to the database. | |
Re: What exactly is the output you expect. Try giving a detailed example. Sidenote: Am not sure how your table structures are, but you should be able to use a single join query, so you won't have to query twice. | |
Re: Have a look at [URL="http://msdn.microsoft.com/en-us/library/ms189794.aspx"]DATEDIFF()[/URL]. | |
Re: In addition to cereal's answer, if you send a new random password, you may want to expire it quickly to prevent the user forgetting to change it, and others hijacking it. | |
| |
Re: Even if you disable right click, view source, and browser debuggers will still show the image's path. Not sure why you want this, but you could build a [iCODE]showimage.php?id=xxx[/iCODE] to show your images. | |
Re: Do you already have a solution for 1 and 2, or is this what you are looking for ? Apart from that I strongly recommend building the fifth database, to avoid your result pages getting slow. For getting the lowest price on Amazon you could run a nightly script. | |
Re: No error visible in this part. What exactly is not working? Please no chat speak, try full sentences. | |
| |
Re: [QUOTE=simplypixie;1736822]Why not search what Undefined Index means - there are very easy to understand explanations if you just Google it.[/QUOTE] And a lot of threads on the same subject in this forum already. | |
Re: Create a BaseController, include the session check, and derive your class from that one. | |
Re: [CODE] $resultSecond = db_query(" SELECT entity_id FROM field_data_field_days WHERE bundle = 'postit' AND field_days_value > $customvishaltime AND entity_id NOT IN ( SELECT entity_id FROM field_data_field_date WHERE bundle = 'postit' AND field_date_value > $customvishaltime) "); [/CODE] | |
Re: Doesn't this work ? [CODE] foreach ($cats as $c) { echo "Temp:" . $c->description . "<br />"; } [/CODE] Unless there are no subcategories, in which case your code returns null. | |
Re: Change line 16 to this. If there's an error, you'll see it. [CODE] $result = mysql_query($query) or die(mysql_error); [/CODE] | |
Re: If you have a list of ID's then you can do a query like this: [CODE=sql] DELETE FROM `table` WHERE `id` IN (1, 2, 4, 5, 6) [/CODE] Just explode your array to build the where block. | |
Re: If it's mysql, see [URL="http://php.net/mysql_connect"]the manual[/URL]. Otherwise provide more information. | |
The End.