Forum: PHP Oct 20th, 2009 |
| Replies: 6 Views: 14,600 The file extension will not affect a new site, but it will affect an existing site that has already been indexed. The old page URLs in the search engines will generate 404 status codes (Page Not... |
Forum: PHP May 6th, 2009 |
| Replies: 4 Views: 740 This might also help.
Preventing SQL Injection (http://www.tech-evangelist.com/2007/11/05/preventing-sql-injection-attack/) |
Forum: PHP Feb 3rd, 2009 |
| Replies: 4 Views: 535 You do not need all of those PHP start and end tags.
You only need one at the beginning of the PHP code and one at the end. Any blank line in between a close and start tag is being sent to the... |
Forum: PHP Jan 3rd, 2009 |
| Replies: 4 Views: 3,145 You might want to check with your hosting company about the MySQL connection. Not all hosting companies allow you to connect via localhost.
With GoDaddy and some others the MySQL database resides... |
Forum: PHP Nov 24th, 2008 |
| Replies: 2 Views: 730 Here is a tutorial for building a select box from MySQL data.
Populating a Select Box With PHP and MySQL (http://www.tech-evangelist.com/2007/11/22/php-select-box/)
I think Jaseva is right.... |
Forum: PHP Oct 29th, 2008 |
| Replies: 2 Views: 488 The best way to really learn osCommerce is to download the code and set up an osCommerce test site. You don't have to sell anything, but you do need to learn to work with the code.
osCommerce is... |
Forum: PHP Oct 29th, 2008 |
| Replies: 3 Views: 2,252 humbug's code is correct.
The only reason that IE appeared to be displaying the table correctly is because the table code was invalid and the closing table tag was not being recognized. Each... |
Forum: PHP Oct 23rd, 2008 |
| Replies: 8 Views: 1,627 You need server root access in order to manually modify the httpd.conf file. Very few hosting companies will give a site owner root access. Using cPanel to add a subdomain does the same thing.
... |
Forum: PHP Oct 13th, 2008 |
| Replies: 5 Views: 607 No, you are not making yourself clear enough, or you would have had 10 responses to your question.
If you want to be absolutely correct, it is a Flash video, not a Flash movie.
And PHP has... |
Forum: PHP Oct 12th, 2008 |
| Replies: 5 Views: 1,941 Hi Diode
The purpose for cleanQuery is to protect your data from malicious SQL injection attacks. Those attacks only occur when querying a database. The point is that cleanQuery doesn't strip any... |
Forum: PHP Oct 12th, 2008 |
| Replies: 5 Views: 607 Try taking the links out of the Flash presentation. The hyperlinks need to be visible in the HTML code. |
Forum: PHP Oct 12th, 2008 |
| Replies: 5 Views: 1,941 Hi Diode
I think you misunderstand what that function does and how it should be used. The function you are using does not clean out any SQL code. It merely escapes (with a backslash) characters... |
Forum: PHP Oct 10th, 2008 |
| Replies: 6 Views: 591 If you just want to prevent page elements such as buttons from displaying on printed output, the easiest way to do that is by using external stylesheets. You can use a different stylesheet to format... |
Forum: PHP Oct 9th, 2008 |
| Replies: 6 Views: 612 What is a JARGAN?
In order for CAPTCHA to work, you need to have GD support in PHP enabled on your server. It has been included with PHP since version 4.3, but it might not be enabled.
You... |
Forum: PHP Oct 9th, 2008 |
| Replies: 4 Views: 631 I stared out using ASP in the 1990s and then migrated to PHP. I also investigated Cold Fusion and JSP.
Here are my observations about Cold Fusion:
1.You can only run it on a Cold Fusion... |
Forum: PHP May 19th, 2008 |
| Replies: 4 Views: 1,536 PHP is server-side code. It runs on the server and is executed before a script is sent to the user.
JavaScript is typically used as client-side code. It runs in a user's browser and is executed... |
Forum: PHP May 14th, 2008 |
| Replies: 16 Views: 4,512 I have to agree with nav33n. That would not cause the problem. |
Forum: PHP May 14th, 2008 |
| Replies: 16 Views: 4,512 You need to isolate the problem. At this point, you don't know if the GET variable is not picking up the value or if the value is not being inserted into thte table.
add echo $q_id;
just after... |
Forum: PHP May 12th, 2008 |
| Replies: 1 Views: 1,145 If your host allows you to modify the .htaccess file, you can add the following line of code to turn safe mode off.
php_flag safe_mode off |
Forum: PHP Mar 27th, 2008 |
| Replies: 11 Views: 2,344 You are trying to insert an id value of ' ' when you have that column set up as auto_increment. Don't insert an id value. Let MySQL set the id value.
Try this:
mysql_query("INSERT INTO... |
Forum: PHP Feb 8th, 2008 |
| Replies: 3 Views: 6,520 You can also turn on the error message. It does a good job of pinpointing most errors. Place it at the top of your script, just after the first opening PHP tag '<?php'
Do not leave this turned on... |
Forum: PHP Feb 5th, 2008 |
| Replies: 10 Views: 1,454 Here is a MySQL cheatsheet (http://www.tech-evangelist.com/2007/11/23/mysql-cheatsheet/) that includes examples of various table joins. |
Forum: PHP Jan 25th, 2008 |
| Replies: 4 Views: 1,753 It's a joke. He's pulling your chain.
It's his first post.
Everyone knows that it takes exactly (%43h7c99bdE23% * (3.14159^2 / 64)) nanoseconds to train a neural network for the first time. :)... |
Forum: PHP Jan 17th, 2008 |
| Replies: 5 Views: 4,983 I strongly advise you to NOT use Word as a tool to create web pages. The Microsoft HTML conversion utility generates horrible code. |
Forum: PHP Jan 5th, 2008 |
| Replies: 3 Views: 1,616 Have you tried using SELECT DISTINCT?
$sort = mysql_query("SELECT DISTINCT genre FROM bands ORDER BY genre");
That will return only one "distinct" row per genre value.
It looks like you... |
Forum: PHP Dec 9th, 2007 |
| Replies: 5 Views: 927 That's a good routine to use if your server is set up to use it properly.
mysql_real_escape_string will not work unless you are using at least PHP 4.3.0. Also, if magic quotes is turned on, you... |
Forum: PHP Dec 8th, 2007 |
| Replies: 4 Views: 970 You use dots to concatinate string values in PHP. The dots do not appear in the final value. |
Forum: PHP Dec 6th, 2007 |
| Replies: 4 Views: 970 Try using different values for your select options. It makes it much easier to assemble a date in the proper format, which is yyyy-mm-dd.
<select name="date_year">
<option... |
Forum: PHP Dec 1st, 2007 |
| Replies: 16 Views: 1,737 I agree copmpletely with csgal.
I think it comes down to this.
PHP is overwhelmingly more popular than PHP, but .NET is very popular in large corporations.
IMHO, if you want to develop web... |
Forum: PHP Dec 1st, 2007 |
| Replies: 4 Views: 1,002 As MitkOK mentioned, PHP is a server-side language, which means the PHP code is executed on the server before sending it to the browser as client-side code. Server-side languages allow you to pull... |
Forum: PHP Nov 23rd, 2007 |
| Replies: 3 Views: 1,339 Simple PHP should do it if you do not know regular expressions.
$string = "abcd123xyz";
if((substr($string,0,3)=="abc") && (substr($string,-3)=="xyz"))
{
$string = "this is a test";
} |
Forum: PHP Nov 11th, 2007 |
| Replies: 4 Views: 911 Why don't you list what you think are the advantages with using classes? Most people do not see any advantages, especially for relatively small web sites. |
Forum: PHP Nov 5th, 2007 |
| Replies: 4 Views: 3,338 Spreadsheets are for tabular data. How do you plan to break a web page up into cells? Are you talking about data that you are displaying on a PHP page?
I'm not sure how you would do this from a... |
Forum: PHP Nov 5th, 2007 |
| Replies: 4 Views: 3,338 It looks like your last line is wrong. Also, try this version of the first line. This is what I use:
header("Content-type: application/x-msdownload");
header("Content-Disposition: attachment;... |
Forum: PHP Nov 3rd, 2007 |
| Replies: 8 Views: 1,167 It's usually a good idea to add the following to the top of any PHP script that you are troubleshooting.
error_reporting(E_ALL);
You would have seen the permissions issue right away.
But... |
Forum: PHP Nov 1st, 2007 |
| Replies: 8 Views: 1,167 I think what people are trying to tell you is that you need to replace,
$destination = "upload/";
with
$destination = $_SERVER['DOCUMENT_ROOT']."/upload/";
That should fully specify your... |
Forum: PHP Jun 7th, 2007 |
| Replies: 26 Views: 11,819 It appears that there is little more to a Debian install than this. I just installed it as a Web server from the downloads on the Debian site.
It appears to work fine as a stand-alone PC, but is... |
Forum: PHP Jan 9th, 2007 |
| Replies: 3 Views: 1,361 The script isn't there. I get redirected to the home page. |
Forum: PHP Nov 25th, 2006 |
| Replies: 2 Views: 1,962 I assume that when you say that your server does not allow scripts, you mean that you can only run static HTML pages.
If you cannot run any type of scripts, you probably cannot use a captcha... |
Forum: PHP Sep 17th, 2006 |
| Replies: 2 Views: 2,118 Passing the page URL using a hidden field is the safest way to do it.
You could use $_SERVER['HTTP_REFERER'], but as zippee mentioned, not all browsers pass the info. You could just simple test... |