- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 10
- Posts with Upvotes
- 9
- Upvoting Members
- 10
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
I'm a PHP developer by profession and a general tinkerer by habit. I like messing about with things. This includes everything from programming languages to games to people. One big learning experience.
- Interests
- PHP, JS, general development, Tech, gadgets, sci fi, fantasy
- PC Specs
- Core 2 Duo 2.93GHz E7500 19" Samsung LCD ATI HD 4600 WinXP
54 Posted Topics
Re: Since you're running PHP code, the JS wil only be executed after the PHP code is run. So you can run it with or without a timeout. Simply adding the following code anywhere (valid) in the HTML page is enough, [CODE] <script type='text/javascript'> self.close(); </script> [/CODE] | |
Re: Hmm, PHP include() (and require()) are server side methods that include a file on the server to the current file. On the other hand, the <head><html> and <body> tags are client side HTML. Not really connected at all, so to answer your question, no. It's not dangerous to have those … | |
Re: Fist (in FireFox) press CTRL + SHIFT + J and load the Error console. Clear the contents before you reload the page. When you reload the page, if errors appear, fix them. Is the call jquery ajax call being made? If you're using firefox, install the firebug extension. This extension … | |
Re: What is the version of PHP that you are using? | |
Re: Umm, sorry I don't understand. Is your problem solved or do you still have a question? | |
Re: You're accessing array elements without actually populating them. I'm assuming there must be other included files that handle the population of these variables. You should have a look at that. Specifically where the $page variable is being populated | |
Re: did you rename database.php.default in cake-project\app\config ? Just change the values for the $default variable and you should be ready to go. | |
![]() | Re: You can send a POST request. That doesn't involve sending data through the URL so the 256KB limit won't apply. If you want to upload a file or something like that, it would be better to just post to and iframe so that the page doesn't refresh. |
Re: Hmm, I'm not a C++ user (PHP dev) but are those IF conditions on line (23 and 30) supposed to have semicolons? As far as I know, you don't end the start of a conditional statement like that. | |
Re: This should be what you need RewriteRule ^([a-z0-9-\s]+) artist.php?artist=$1 [L,NC,QSA] | |
Re: Xampp is probably looking for its own PHP files. Since drupal is in its own directory it won't have problems with missing files. You probably moved the Xampp PHP files. Check to see if [B]C:\xampp\htdocs\includes\defines.php[/B] is present in the directory mentioned. If it's not, you probably moved it. If you … | |
Re: Although it adds another layer to the code (sometimes making it slower but not always, since you have caching) it helps separate the business logic from display logic. When your allowed to work with PHP in the view, you're tempted to do business processing in there as well. But when … | |
Re: I haven't worked with Python, but I work with PHP and JSF. If your focus is just on web programming I'd recommend PHP. But you should always keep in mind to choose the correct language for your solution. PHP is a good choice because it's specifically made for the Web … | |
Re: You can do it at the database level as well if you want. [B]For INSERT[/B] [CODE] $aes_key = "EF77FHH7-E6G1-31y4-w2D7-G4gH8HWF20H1"; $sql = "INSERT INTO user(username, pass) VALUES ('bob', AES_ENCRYPT('password', '$aes_key' ))"; [/CODE] [B]And for SELECT[/B] [CODE] $aes_key = "EF77FHH7-E6G1-31y4-w2D7-G4gH8HWF20H1"; $sql = "SELECT *, AES_DECRYPT(password, '$aes_key ') AS password FROM user"; [/CODE] … | |
Re: Just keep your classes separate by thinking of what they are there for. The classes/methods that access the database or some other datastore and (auth($username, $password)) process logic (also known as the Model or DAO - Data Access Objects) should be separated from classes/methods that just display some information given … | |
Re: This is assembly language. [URL="http://www.google.com/search?q=assembler+language"]See these links for more information[/URL] | |
Re: You're control panel should have Cron Tabs. Most hosts have them I think, why not send them a support mail? | |
Re: Unless they have an API, you'd have to grab their HTML and parse it to get what you need. ![]() | |
Re: whois information points to an address in the US. Probably from there. Why is it important? | |
Re: First write a PHP page that accepts a variable (username) and does a database query to see whether it is available. This page can return a value depending on whether the username is available or not. Once you have done that, use Javascript on the form so that everytime the … | |
Re: What kind of a post? Facebook has a PHP API that you can use to do a lot of stuff, but you'll have to be clearer about what you want to do. | |
Re: PHPBB doesn't allow an existing userbase to be automatically migrated to its user database. You'd probably have to write a connector yourself for that. What kekkaishi was talking about is whether a user is logged into the board once the user logs in the first time, not user migration as … | |
Re: Orkut probably uses some server side push technology (maybe Comet). But shout boxes work by continually pinging the server for new posts. Normal AJAX. Well, most of them anyway. | |
Re: You can do it with a combination of ajax and sessions in php. On the client side you'll have to write some js to so that it grabs the image (through ajax) every X minutes. This would be calling something like getsignature.php. On the getsignature.php file, you'd check the session … | |
Re: It would be better if you use a query string instead of a variable. So that PHP can directly access it using $_GET. Failing that, you could make an ajax call to send a request to PHP file with the hash id as a parameter. Only reason you should be … | |
Re: Since you're checking the $_POST['upload'] field and not the $_FILE array direct you can just split your code there itself. Meaning, if $_POST['upload'] is not set you want the script to fill in with NoPicture.jpg (am I correct?) If so, this should fix your conundrum. [CODE] define("DEFAULT_IMAGE", "NoPicture.jpg"); define("DEFAULT_IMAGE_PATH", "/some/path/to/file/"); … | |
Re: Need a lot more information before anyone can help you out. You better list out exactly what you want. | |
Re: People aren't going to do your work for you. It's best if you make your own start and then come to us when you come against a stumbling block :/ | |
Re: If you're using .NET you can use a web service (Easier with .NET sinc it's all integrated). PHP can call the web service and the Web service in turn can make some offline calls to VB. Don't have the specifics at hand (You can probably use the SOAP, Web Services … | |
Re: Ouch. You're trying to assign a whole bunch of uncleared HTML into that variable. Since you've wrapped it with double quotes and the HTML itself has double quotes you'll keep getting errors. A better way to do it would be to use heredocs. Change your code to this, [CODE] $message … | |
Re: Hello again, I didn't have time to go through your whole code (gotta get some shuteye) but I noticed that your Form didn't have [B]enctype="multipart/form-data"[/B] in its attribute list. Try running your script with that added. Also, I recommend that you clean up your validation (all those IF-ELSEIF) so that … | |
Re: Do the links change according to the keywords or do the links remain the same while keywords are switched around? ![]() | |
Re: You can just remove the # from the href (leave it empty or give it a false page url and not an anchor) and return false instead of preventDefault(). Probably not the best way, and your HTML won't validate. But it should fix your issue if HTML validation is not … | |
Re: What do you mean by game script? Your question isn't very clear. | |
Re: Good stuff. I suggest that you format the code so that readability is increased. | |
Re: You optimization testing will need to be carried out alongside load testing for your database server. If this is for a production/live server, I suggest you run some software to simulate the loads and then run both scripts to time it. During work (I work for a large ecom store) … | |
Re: You can have as many headers in the script as you want, just make sure your control flow only uses one. PHP is probably complaining about this because it's encountering 2 headers in its normal flow. Use IF conditions to check which header needs to be fired. This should solve … | |
Re: Interesting problem, maybe they are setting some variable into hidden inputs using JS and looking for that on page submit. On the page that you actually receive, does it include any errors or notices printed from the other site? | |
Re: I haven't worked with the builtin prototype library for CakePHP. But I'm guessing you have to use some kind of callback function on the clientside so that when the data is returned from the cake controllers you receive it as data. Don't know the specifics at the moment, sorry. | |
Re: The best way to do this would be to use a cron job to run a scheduler on your database. Write a query to search for users who have their birthdays on the day the script is being run (today) and then schedule it to run every day. You can … | |
Re: I know this isn't the answer to your question but you could try using a JS library like jQuery. It makes ajax handling and XML manipulation a breeze. Will try to recreate your problem to help with a solution. | |
Re: The script just concatenates a lot of characters together and then searches the "Hello World" string for the original string you created. I think the original intention was to create a regular expression of valid characters and search for those characters in a string you input but that went horribly … | |
Re: Your SQL update query is wrong. I don't know what you're trying to update, but you've quoted the [B]$[/B] mark as well. Also, when you run this update query, your whole DB will get updated. Is that intentional? | |
Re: If you really want to access that variable from outside the proper scope (the correct way would be to encapsulate in a class or put it in config) the use the [B]global[/B] keyword. Whenever you want to use the value stored inside that variable globally use [CODE]global $_productCode;[/CODE] ... and … | |
Re: Can you include a static HTML of your code along with the JS so that I can run it in a browser and debug? Just 1 or two modules should be fine. Just save your page or something. | |
Re: You're actually trying to cast it. Just remove the (double) and * [CODE]mt_srand(1000000 );[/CODE] Even this is correct [CODE]mt_srand( ( double ) 1000000 );[/CODE] Close if this solves your problem. | |
Re: You can also use [CODE]INSERT INTO my_table(field4, field3, field1, field2) VALUES(2, 2, 5, 1)[/CODE] The order won't matter here. | |
Re: The simplest solution for your problem is to query all the data you need through your web application or C++ application and save them into csv or xls format. This is accomplished easier if you do this through your PHP application. If you're using PHP you can use libraries like … | |
Re: Yeah, the code's fine (unless you gave us the wrong file). Just follow Atli's instructions. |
The End.