Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
91% Quality Score
Upvotes Received
32
Posts with Upvotes
31
Upvoting Members
21
Downvotes Received
3
Posts with Downvotes
3
Downvoting Members
3
10 Commented Posts
3 Endorsements
Ranked #486
Ranked #334
~71.1K People Reached
About Me

FlashCreations (aka PhpMyCoder) is a freelance PHP programmer and website designer mainly focused on Web 2.0 startups and interactive online tools. He also writes tutorials and articles about the web, programming, and design on his blog.

Interests
Programming Baseball Basketball
PC Specs
Dell E1705 with 2GB DDR2 Intel Core Duo Running Windows Vista Home Premium SP1
Favorite Tags

181 Posted Topics

Member Avatar for mrcniceguy

Well, I'm not expert with PHP, but I would suggest creating an SQL table called onlineUsers or somthing like that. Then when users login a PHP script adds them to the table. When they logout, simply remove them from the list. Something like: [code=php]<?php //Log the user in $con = …

Member Avatar for ashkan_3
0
9K
Member Avatar for digital-ether

Awesome snippet!!! No longer to webmasters have to sift through a SQL database full of emails such as [email]random@thisisnotahost.com[/email]!!!!

Member Avatar for lps
0
4K
Member Avatar for FlashCreations

Here's how this one works. I'll start by posting one line of PHP script. The next person to post will add another line and copy the script into their post. You will simply add a line of PHP code to the script everyone wrote above you. Also don't forget to …

Member Avatar for erikqs
0
301
Member Avatar for monsterpot

How about trying a Google search? You could search within the HTML for your Javascrpit code. If you would like it in script form, try using the Google Ajax Search widget and simply count the results!!!

Member Avatar for aqeel.mmd
0
940
Member Avatar for javadano

What about JQuery?? jQuery Documentation: [URL="http://docs.jquery.com/Ajax/load#urldatacallback"]http://docs.jquery.com/Ajax/load#urldatacallback[/URL] If not maybe try this code: [code=PHP] /*For safety reasons I would only allow the PHP file to determine the location of the file...if you want the ability to pick your file just post and I will modify my code*/ $file = "test.txt" //Test …

Member Avatar for azzhey
0
2K
Member Avatar for sirin_ibin

It's also important to note that overuse (Multiple requests made in under a couple seconds) of websites such as Yahoo, Google, or Bing can get your IP banned from accessing their services. Furthermore, if you are on a shared IP your chances of being blocked are higher since there is …

Member Avatar for hielo
0
1K
Member Avatar for jarmerson

Since you're new we'll cut you some slack! But if you noticed there is a pinned thread at the top of the forum that talks specifically about this error. Be sure to [URL="http://www.daniweb.com/forums/thread191031.html"]check out this great thread[/URL]. It's bound to have your solution!

Member Avatar for jarmerson
0
173
Member Avatar for thr

It all depends on what you are looking for. Java has the best implementation of OOP, but requires the JRE (Java Runtime Environment) to be installed for applications to work. It should be used for cross-OS programs or to server web content (JSP). PHP is best suited for web applications …

Member Avatar for Premsathishbe
0
341
Member Avatar for GigsD4X

[QUOTE=vibhadevit;1316560]The function will not internally parse it. But lets say i have one php page : [url]http://www.mysite.com/register.php[/url] And i use file_get_contents('http://www.mysite.com/register.php') then html source will be returned by file_get_contents function. Simply we can have 'View Source' type of functionality.[/QUOTE] From the PHP.net documentation: "file_get_contents() is the preferred way to [b]read[/b] …

Member Avatar for GigsD4X
0
451
Member Avatar for andydeans

Props to you for using something other than MD5. Now on to business. The basic way to validate a password stored in a database is to use a one way encryption such as SHA1. This involves hashing the password the user provides at registration and storing it in a database. …

Member Avatar for andydeans
0
157
Member Avatar for MooGeek

I think the question is not Flash/PHP vs. AJAX/PHP. Since Flash also designs content I would argue the debate is actually Flash vs. HTML5/CSS/JavaScript. The latter is an inseparable and pretty much unbeatable trio. Besides the open source benefits of HTML, CSS, and JavaScript, the big seller for most font …

Member Avatar for ApocDen
0
239
Member Avatar for slap01

[QUOTE=britoniah3480;1316693]Lol because of this [CODE=php] $id = $_GET['id']; //you forgot to put the $id = $username = "root"; $password = '123456'; $hostname = "localhost"; $db = mysql_connect($localhost, $username, $password) or die ("Unable to connect to mySQL".mysql_error()); mysql_select_db('mynewdbase'); $del = "DELETE FORM newdbase WHERE id = $id"; $nres = mysql_query("$del); ?>[/CODE] …

Member Avatar for Stefano Mtangoo
0
119
Member Avatar for JBLDW

I'd suggest a simple variable that increments with each iteration of the foreach loop. With something like the code below, you can access the number of the element with the counter variable. [code=PHP] // +-- // | Loop through the products. // +-- $counter = 0; //Init the counter foreach …

Member Avatar for JBLDW
0
207
Member Avatar for arthurav

Sure it is. As long as you don't have any includes or extensions that could access this global. My guess would be that you won't be including and malicious scripts on your site intentionally, so with the details you gave, I would say you're safe! -PhpMyCoder

Member Avatar for FlashCreations
0
108
Member Avatar for ckant_kol2006

You don't, well technically you can, but there's a better way in my mind to store avatars. Simply upload them to a writeable directory (and be sure to check their name for validity: ensure to remove and null characters) and rename them to the user's name. You can also rewrite …

Member Avatar for FlashCreations
0
346
Member Avatar for thenixx

For the first URL, you can retrieve the var parameter by exploding the string returned by parse_url. You can also use a Regex if you want. [code=PHP] $param = explode('&', parse_url($url, PHP_URL_QUERY)); if(is_int($param['var'])) { //$param['var'] for the var parameter } //OR preg_match("/var=([0-9]+)/i", $url, $matches); //$matches[1][0] for the var parameter [/code] …

Member Avatar for FlashCreations
0
109
Member Avatar for arctushar

Limits are based on characters and not by words. Longtext allows for 4GB of characters, so in theory it depends on how long your words are. It is possible to have ten words that contain more characters than 100 words. But I doubt this is the case. Some possible limitations …

Member Avatar for FlashCreations
0
143
Member Avatar for ceeandcee

You probably couldn't find anything because this is not a PHP specific feature. It only requires some HTML & CSS. I found [URL="http://www.chami.com/tips/internet/052898I.html"]this tip on adding printer-only page breaks[/URL]. Is this what you're looking for?

Member Avatar for chrishea
0
180
Member Avatar for phplover

If application/octet-stream works, why not use it? The only problem you mentioned is that Opera reports the file as 1.2MB instead of 1.12MB. This is probably not an error on your part. Opera usually rounds up all sizes to the tenths place so a file might be 12.56 MB but …

Member Avatar for phplover
0
133
Member Avatar for veledrom

If you are using this code to download an image to [i]your[/i] computer (and not a server), I would use Python instead since it is suited for server side development as well as little scripts you want to schedule on your computer. If you would like to continue with PHP, …

Member Avatar for hielo
0
241
Member Avatar for PhilEaton

Regarding for your original code, the reason why the IP displayed but you couldn't click the link is because you were missing an = between the href and the first quote. Try this: [code=HTML] <a href="<?= $ip ?>"><?= $ip ?></a> [/code] Also notice that since you have shorttags enabled I …

Member Avatar for FlashCreations
0
151
Member Avatar for jasmeen kaur

[URL="https://www.google.com/adsense/"]Google Adsense[/URL] is nice, free too. It's not PHP, but it should work.

Member Avatar for FlashCreations
0
65
Member Avatar for asahmed

Well the most basic way in PHP would be to simply use the header function to report the 301 and then notify the user of the new location. That can be done like so: [code=PHP] <?php //301 Redirect header('HTTP/1.1 301 Moved Permanently'); header('Location: http://sub.domain.com/index.php?product='.urlencode($_GET['product'])); ?> [/code] Though, if you want …

Member Avatar for FlashCreations
0
91
Member Avatar for loll_l

What do you mean by blank bookings? Is the email you receive blank or are the spaces where data should be blank? Do you enforce the filling of required fields via PHP? You can also enforce this via JavaScript (it doesn't seem like you do), but you should always enforce …

Member Avatar for FlashCreations
0
165
Member Avatar for Syphilis

Props to you for having the most creative greeting I've seen on DaniWeb! :D Ahoy Captain Syphilis (Sounds a little strange, but anyway), I'd suggest registering [icode]socket_close()[/icode] as a shutdown function after the child makes a connection. This way any early exits will close the socket before ending the script. …

Member Avatar for MooGeek
0
153
Member Avatar for detweiller

Something like this will have to be achieved with a combination of AJAX and PHP. The frontend (JavaScript) will call your backend (PHP) with a request when a new name is selected from the list. At its most basic form, that would like something like this: [code=PHP] <?php //If a …

Member Avatar for ﻼim
0
279
Member Avatar for emilcarlo

A few years back I made a simple Pagination Class w/ documentation. I'm not trying to pedal my script, but if want to take a look you can [URL="http://files.phpmycoder.net/1209da/"]find it on my site[/URL].

Member Avatar for FlashCreations
0
162
Member Avatar for Facte

To be absolutely sure, you could split the string into the date and time part with [icode]explode()[/icode]: [code=PHP] //Split it and eliminate the time list($date,) = explode(' ', $date); //Show the result echo $date; [/code] On the off change that the date format does not add leading zeros to one …

Member Avatar for FlashCreations
0
114
Member Avatar for amit.hak50

You will need to edit your theme (this can be done in Wordpress) and find your footer.php file. Locate the appropriate code, in this case some kind of heading for a bookmarking list, and remove it. Save the file and refresh a blog page. Your undesired content should be gone! …

Member Avatar for FlashCreations
0
66
Member Avatar for cdunde1

I'm no Wordpress expert, but I'll give it a shot. My guess is that your functions are being called before Wordpress outputs a header (such as a redirect). This will cause problems because headers are sent after the first character of content has been outputted. It might help to actually …

Member Avatar for cdunde1
0
194
Member Avatar for starmikky

Tizag has [URL="http://www.tizag.com/phpT/fileupload.php"]a great tutorial on getting started with PHP uploads[/URL]. Read over it and post back if you have any questions. [i]Tip: Be sure to check the file type so users can't upload exe's, dll's or any non-image files.[/i]

Member Avatar for canterorist
0
103
Member Avatar for bibiki

So is it solved? If not, can you give us a sample of some of the URL's you try? The URL you gave in the first post should work fine and did work fine when I tried it. If it doesn't, have you set your charset to the appropriate one …

Member Avatar for FlashCreations
0
106
Member Avatar for ceeandcee

britoniah3480 has a point. MySQL doesn't limit the number of rows in a table because that is not the purpose of a database. You can assume rows are empty if they aren't set (See britoniah3480's code above). When inserting, you can ensure that there are still spaces by doing a …

Member Avatar for MooGeek
0
149
Member Avatar for baudday

You could use [icode]ob_start()[/icode], include the file that creates the page (taking care to add any necessary GET variables to the include path as you would with a URL), and then store the contents of [icode]ob_get_contents()[/icode] in a variable. Demo below: [b]index.php[/b] [code=PHP] //Start output buffering ob_start(); //Get the contents …

Member Avatar for ﻼim
0
173
Member Avatar for Awah Mohamed

Ah, W3Schools is such a great resource isn't it! I'm glad you check it for help. Regarding tpl files, Ancyent is correct. They are mostly associated with Smarty. However, if I may throw in a suggestion: Don't bother with Smarty unless you really don't want to learn PHP. If you …

Member Avatar for ﻼim
0
94
Member Avatar for hotice47

Instead of relying on a guest's cookies to determine a guest's name (whether it be Guest1 or Guest34582), I would turn to PHP when the guest enters the room. Each time a guest navigates to a room I would add them to your users table, assign them a unique ID …

Member Avatar for MooGeek
0
188
Member Avatar for NetHead21

The basics of a user system involves three main parts. [LIST=1] [*][B]Registration -[/B] The user provides details such as desired username, password, and email. Some verification should be done to make sure that the user names and emails are unique to that user. If they are, insert this information into …

Member Avatar for MooGeek
0
226
Member Avatar for LRNPHP

Well you'll need to find a way to get the short code SMS to communicate with your PHP script. I have no idea how to do this. When it comes to the PHP, it seems easy enough. [code=PHP] switch(strtolower($_GET['command'])) { case 'pizza': $r = mysql_query("SELECT * FROM pizza ORDER BY …

Member Avatar for MooGeek
0
545
Member Avatar for phplover

Assuming that the downloads are routed through a PHP script, it should be simple enough to record user download data. The devil is in the database and how you store this information. Here's my recommendation: You only need one table to store download information along with hit counts. I recommend …

Member Avatar for phplover
0
174
Member Avatar for lordsbaby2010

This is not true [b]at all[/b]! The following will work assuming that you are connected to a mysql database with a table named foo: [code=PHP] mysql_query("SelECt FRom foo"); [/code] Your problem most likely is that your query doesn't return any results. In that case, [icode]mysql_fetch_array()[/icode] will not work because there …

Member Avatar for FlashCreations
0
238
Member Avatar for LRNPHP

[B]EDIT:[/B] No need to be rude LRNPHP. We're trying the best we can to help. If you didn't think you'd get help with your question, why did you post in the first place? All of us are volunteers here. Please respect that! If you want a new window, I suggest …

Member Avatar for LRNPHP
0
169
Member Avatar for cristi08

*Cringe* Please, please, please [icode]mysql__real_escape_string()[/icode] any user given value before using it in a query. Without doing so you are putting yourself at high risk of SQL Injection! Now on to your problem. I would check the query (it seems you've outputted it out as a comment) on the second …

Member Avatar for cristi08
0
103
Member Avatar for vizz

If I may add my ten cents, I believe that CodeIgniter.com has [URL="http://codeigniter.com/tutorials/watch/blog/"]a great 20 minute tutorial on creating a basic blog[/URL]. Not sure if you consider CI "a feature", but its a great way to create applications without having to worry about internals. This way you can learn the …

Member Avatar for FlashCreations
0
181
Member Avatar for whiteyoh

Forgive me for being obvious: If you're not calling the function, that might be the problem. [code=PHP] <?php function request($url, $postdata) { $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata); curl_setopt($curl, CURLOPT_HEADER, 0); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($curl); curl_close($curl); return($result); } $url …

Member Avatar for whiteyoh
0
212
Member Avatar for MDanz

My first instinct would be to ask whether you want the $key variable to contain the key of the array or the value. If you want the former your foreach will need to look like this: [code=PHP] <?php //Php doesn't implicitly assume you want the key if you call the …

Member Avatar for FlashCreations
0
85
Member Avatar for kanjigirl

If you are attempting to create an IE compliant page you may also want to look into IE conditional comments. Anything between them is only shown by the appropriate version of IE. [code=HTML] <!--[if IE 6]> <b>IE 6 Only!</b> <![endif]--> [/code]

Member Avatar for FlashCreations
-1
113
Member Avatar for The Dude

Ale, Bad, [URL="http://dictionary.reference.com/dic?q=bale&search=search"]Bale[/URL], Bold, Dale (If names count...), [URL="http://dictionary.reference.com/dic?q=dole&search=search"]Dole[/URL], Lad, Lead, Rob, Role. That's about all I can thing about........ programming

Member Avatar for kaninelupus
-1
3K
Member Avatar for whitestream6

I just wrote a pagination script (for another DaniWeb User). Let me find the link to it and I'll show you my code... [b]EDIT:[/b] Here's the link: [URL="http://files.phpmycoder.net/1209da"]http://files.phpmycoder.net/1209da[/URL] I believe mine does 10 a page, but that is easily fixed. Just read the Readme in the ZIP file and you …

Member Avatar for whitestream6
0
600
Member Avatar for solarb

Actually funny enough, he does have some sort of security in place. The tag <iostream> was removed because of it's containing < and > (which generally signifies an HTML tag). What needs to be done though, is not stripslashes or addslahses. It's mysql_real_escape string(): [code=PHP] <?php include("contentdb.php"); //Connect to MySQL …

Member Avatar for solarb
0
154
Member Avatar for damnpoet

Well this is directly from the FPDF site. It's about columns: [URL="http://www.fpdf.org/en/tutorial/tuto4.htm"]http://www.fpdf.org/en/tutorial/tuto4.htm[/URL] You want something aligned? How? Centered? (Left, which should be the default) Right? Can you detail exactly what you are looking for. Maybe provide a graphic to show what you're looking for.

Member Avatar for damnpoet
0
170

The End.