743 Posted Topics
Re: Hi, Just to be clear, a multidimensional array looks something like: [PHP]$array = array(array(0, 1)); // 2 dimensional since you need two indexes to get the values eg: $array[0, 0];[/PHP] I believe whats limiting the code right now is the notation of your arrays. (that may just be an example … | |
Re: the mbstring extension is the extension PHP uses for encoding and decoding character sets (char-set) that are "multi-byte" (hence the mb...string). Unfortunately this is not enabled by default when installing PHP5 (or 4) so you have to enable it with --enable-mbstring configure option.. see: [url]http://us2.php.net/mbstring[/url] | |
Re: [QUOTE=raheleh;273310][COLOR=#000000]Hi every body [/COLOR] [COLOR=#000000]I don't JavaScript language well. I want to know about visibility or disable html's controls on a web page. I have a web page and I want disable some controls and print my page and after that the controls back to preview condition.[/COLOR] [COLOR=#000000]Pleeeeeeeeeeeeeeas help me:sad: … | |
Re: Is the current site just HTML/CSS? It looks really good. I've never written a full CMS before... I've written small miniture CMS type deals, for web apps, similar. What I usually do is just look into the (GPL) code of my favourite CMS's, and pick out what I like best … | |
Re: Wouldn't to get a larger DPI from a smaller one, would it? Probably go from 300 - 72 DPI? Take a look at this page: [url]http://www.codecomments.com/archive227-2004-5-193544.html[/url] PHP image functions: [url]http://php.net/image[/url] Heres how DPI can be changed with Imagemagick: [url]http://de3.php.net/image#55955[/url] With GD Lib it seems you'll have to just resize the … | |
Re: Hi, Take a look at PHP's GD functions: [url]http://us3.php.net/gd[/url] You'll need the imagepolygon function, [url]http://us3.php.net/manual/en/function.imagepolygon.php[/url], to create your ellipses. :) | |
Re: Are you using an "AJAX" lib or did you write your own XMLHTTPRequest Functions? Could you post them if you did or the lib you're using? That is a weird scenario.. Do you have any out of the ordinary DNS setups? Like domain pointers, cause they cause problems. A thing … | |
Re: FF allows the style "position:fixed;". That will fix the element in a certain position relative to the screen. You can emulate it with IE and other browsers by creating a DIV as the first child of the body to emulate the body. Remove all padding, spacing, borders from the BODY … | |
Re: You'll have to get the scroll offsets and sent it to the server with every refresh, or you can store it in a cookie. Then when the refreshed window has loaded, scroll the window to the saved scroll offsets. Heres how to get the scroll offsets: [code] function getScrollXY() { … | |
Re: [QUOTE=sgriffiths;271512]ok ok What i wanted was an onChange option, this then calls a javascript procedure But i need the procedure to be php with embedded html[/QUOTE] Like mentioned, JavaScript is client side (runs on the browser) and PHP is server side (runs on the server). Regarding: "php with embedded html". … | |
Re: <div id="test"> doesn't exist when your script is being run. Usually, when you are working with the DOM, you would like to wait untill the whole DOM is loaded. try running your code afer the window is loaded. window.onload = function() { // .. your code }; or use the … | |
Re: Note sure what you want really. Its not too clear.. If you want to write a rating script in PHP, then what you'll have to do is. Write a database table to hold the "item" being rated and its rating. A simple table say [B]item_ratings[/B], will have the columns: [B][I]id, … | |
Re: Hi, However, heres one that also make sure you dont match a string such as "4." or "." but matches "0.4" or ".4" for example: [PHP]// validate as an int or float function is_number($str) { if (preg_match("/^[0-9]*\.?[0-9]+$/", $str) && !empty($str)) { return true; } return false; }[/PHP] | |
Re: Hi, What you want to do is: Open a directory handle and read each element in the directory. When you read a directory, it returns all the elements in the directory. Some of these are files, and some folders and it will also return two "virtual" folders "[B].[/B]" and "[B]..[/B]". … | |
Re: [QUOTE=mahe4us;270962]Hi Barnz, Thanks you for your nice reply. I will tell clearly to you. suppose an image is placed in a folder in a different server. I want to access the image or copy the image from that server location to my server location dynamically. I think you can understand … | |
Re: [QUOTE=mindzen;270659]how to use AJAX with Smarty in php?[/QUOTE] very interesting.. and probably quite useful. There are some libs out there for AJAX that allow you to just define a <div> like: [HTML]<div class="ajax" id="pagename.html"></div>[/HTML] and the div will load the page defined. (I wrote one that does the above and … | |
Re: Id go with google maps. I looked at msn's map API and even though they say its been in development longer than google maps, it seems to be a copy, as far as the API goes and just doenst match up. (maybe thats the best way to lay out the … | |
Re: In your code, try dumping the cotents of the array before you use array_filter(). EG: [PHP]var_dump($fee2_code); $fee2_code = array_filter($fee2_code); //line 155[/PHP] The error is because it isn't an array. Even though your HTML looks ok and it seem it should be an array. [QUOTE]It is difficult to understand what the … | |
Re: [code]<html> <body> <p> This is a html paragraph </p> <?php echo 'This is some php txt'; ?> </body> </html>[/code] You will have to name your files with a php extension for the server to recognize them as PHP files and have the PHP parser look for the <?php tags in … | |
Re: Hi artiry, Its pretty hard to figure out whats happening from just the code you provided. Maybe functions.php should be posted also. | |
Re: [QUOTE=ivirtua;266113]Hello I am attempting to upload a backup (gzipped SQL), to my server via phpmyadmin but it is just over the max upload limit therefore I cant upload it! How can I get around this.. is there another way of uploading the phpmyadmin gzipped backup, or changing that limit? I … | |
Re: [QUOTE=okparrothead;254531]Hello all, I have a newbie question. I need an alternative to this: $variable = 'Sometext with some other text <?php include 'somescript.php'?> some more text'; where $variable will be echoed into a webpage as part of the page content. I can echo text into the page all day, but … | |
Re: [QUOTE=donkey;254957]i have nested for loops in the program... earlier today i had added the second one and forgot to change the counter variable so they had the same counter, i ran it, realized i hadn't changed it... changed it and then ran it again. is there any way that the … | |
Re: Hi Nathanpacker, This is actually a JavaScript question, and yes is possible. You just have to put a piece of javascript on the child window, that reloads the parent window with the url parameters you want. The code looks ssomething like: [code] <script> window.opener.location.href = 'http://example.com?param=value'; </script> [/code] | |
Re: Instead of using the HTML meta-refresh, you can send specific HTTP headers that thell the browser not to cache the image. See the header() function: [url]http://php.net/manual/en/function.header.php[/url] These headers should do it for you: [php] header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the … | |
Re: Try something like: [php] function mysql_date($year, $month, $day, $hour, $min, $sec) { return date("Y-m-d H:i:s", mktime($hour, $min, $sec, $month, $day, $year)); } [/php] | |
Re: [QUOTE=mahe4us;253032]Hi everyone, Iam mahendran and i working as a php programmer for the last 8months. I have a doubt to create mail ids in server dynamically using PHP. I wants to write a program for generating alias email ids in server dynamically when user register into the site by giving … | |
Re: Like the Admin said, > Have you considered using a third party PHP parser? I know this isn't a solution to your problem, but I use MagpieRSS PHP parser and I absolutely love it. you could use a third party PHP, RSS parser. How this solves your loading problem is … | |
Re: Hi cjm771, In your login form, you're setting the action of the form to: /login.php?url=<?echo $_GET['url']?> The form sends its data to the server via HTTP POST and you have a URI string that would usually be sent via a HTTP GET. It usually works, but maybe Safari isn't sending … | |
Re: [QUOTE=zippee]Is there anyway I can implement user authentication, such as Sender-ID in php mail function? I like to have email send out from my mail server (from me to clients) as well as email send by users through my online form (to me) to be authenticated.[/QUOTE] Hi zippee, I just … ![]() | |
Re: If you were to do this with a Linux server you could set up a cron job that executes the file you want. On windows you would use the windows task scheduler.. I use this for php, so I guess it should be the same for jsp, no matter what … | |
Re: [QUOTE=SethR]thanks, but limit 0,1 is correct. If I change it to limit 1,1 it won't display the questions. Right now I have three questions in my table so limit is now limit 0,3. All three questions get displayed randomly, the problem is with my grade.php file.[/QUOTE] I dont think you're … | |
Re: I believe you are under estimating the power of the stupid cgi script. Otherwise you would just need a stupid php script for your purpose which is just as stupid. :) Take a look at the stream function section of the PHP manual on php.net It has all you need, … | |
Re: Hi tefflox, I found a few errors: 1) The array $ar has value a, b, c, etc which are undefined. What you actually want is strings: [PHP] $ar = array( 0 => 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f');[/PHP] 2) The … | |
Re: [QUOTE=sac_bid24]How to pass the values of combo box options from one page to other page[/QUOTE] I assume you're asking for multiple select boxes. Use the php array notation for the name of the select box. eg: <select name="myselectbox[]" multiple="true"> <option value="0">Value 0</option> <option value="1">Value 1</option> </select> Notice the name of … | |
Re: [QUOTE=timhysniu]Thanks guys ;) I was just hoping of an idea to run a php script initiated by a visitor where a user wouldnt have to wait for the whole maintenance execution. I guess kind of like branching a single process into two. Thats something I havent done before; Im not … | |
Hi all, I was wondering if there is a way of getting the list of functions inside a class in PHP4. This would be similar to the ReflectionClass in php5. Say for example I have: [PHP]class testclass { function func1() { echo 'I am func1'; } function func2() { echo … | |
Re: Use chmod to set the permissions of the file so its writable. Then open it with write access, then after you write and close the file, use chmod again to change the permissions to read only. eg: [php] @chmod ($configfile, 0755); $xml_string = file_get_contents($filepath); read_write_to_xml($xml_string); if ($fp = fopen($filepath, 'w')) … | |
Re: Hi, This is actually a javascript problem, not php. You'd probably get better help in the js forum. It would also be easier to figure out the problem if you looked at the HTML source instead of the PHP source, as JavaScript is client side and only acts on the … | |
Re: [QUOTE=dcarrillo18]I have a php login system that uses SQL to store users and passwords but users can still download .mp3 files or even pictures (jpeg, gif, etc). Is there anyways I can protect my web directories and files using .htaccess without that popup asking for user and password but using … | |
Re: [QUOTE=donkey]that is perfect, just one more question is there a way to tell it where to display. right now it starts at the level that the form is saved in. is there a way to start it at the root?[/QUOTE] Do you mean you want to specify which Folder to … | |
Re: Hi vssp, Take a look at this page: [url]http://wiki.fckeditor.net/Developer%27s_Guide/Integration/PHP[/url] Thats for FCK editor off the shelf. If you are using FCK Editor with a third party application then ususally the third party app has their own method of posting the fck editor content to the server. The thing to notice … | |
Re: [QUOTE=zippee]Many of you may aware that AOL using floating IP address to manage their internet connection. When I develop my shopping cart, I used IP address as one of the variables to identify user (other variables are datetime and url) and its shopping cart content. It was alright until someone … | |
Re: This would involve javascript rather than php. What you would have to do is use JavaScript to first preload the images, so that there is not delay when the image slides to the next. This is done by attaching an onload event handler to the window object. IE: window.onload = … | |
| |
Re: Like TopDogger said, switch is a bit more readable if you're going to branch code more than 3 ways depending on a value. I would recommend you try using a "factory method" though if you have many different processes. This is a bit of code that acts as a switch … | |
Re: The best help would be PHPBB forum or looking at the directory of PHPBB mods to find what you want. You can also look at some of the html source of VBulletin for the AJAX functionality in the posting, if there isn't already a mod of phpBB for this. | |
Re: lol.. yes, it does sound like a homework assignment.. :) Like Puckdropper said, its better to update the SQL rather than PHP. If you're set on PHP (I dont want to do your homework for you :P) however its a very simple task. Heres the link to php documentation on … | |
Re: Id suggest using Joomla, [url]http://www.joomla.org/[/url] Extensions for joomla: [url]http://extensions.joomla.org/[/url] | |
Re: [QUOTE=LiveWire]Hey guys, I thought I figured it out but I didn't. I decided to create an admimated gif of what I'm looking to do. Could someone help me out and get me going in the right direction? A Basic HTML code would be great as I know really nothing about … |
The End.