Forum: PHP 3 Days Ago |
| Replies: 3 Views: 187 I wouldn't disregard it complete, though, out of fear of backwards incompatibility. Not before testing it.
If you are worried about compatibility with older code, setting up a test server on a... |
Forum: PHP 9 Days Ago |
| Replies: 2 Views: 243 Hey Mike.
To get your current code to only show the city you are hovering over, you need to have AJAX send the index of the city to the PHP file, and have PHP only return the data for that city.
... |
Forum: PHP 9 Days Ago |
| Replies: 3 Views: 180 Hey.
I don't see a problem in the rules. Even tried it and it worked fine on my test server.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule... |
Forum: PHP 15 Days Ago |
| Replies: 5 Views: 221 Neither of those actually change anything, samarudge.
Your first example is exactly like the one the jeet_portal posted in the first post. Using print instead of echo makes absolutely no... |
Forum: PHP 17 Days Ago |
| Replies: 3 Views: 275 Hey.
Since this is browser specific, the problem is likely not in the PHP code itself, but rather the HTML (or other client-side code).
You should start by fixing the HTML for the login form.... |
Forum: PHP 22 Days Ago |
| Replies: 3 Views: 290 And you are quite right :)
Unfortunately a lot of people try to use us to do their work for them; posting their projects all over asking that we post back the complete solution to their problems, so... |
Forum: PHP 23 Days Ago |
| Replies: 3 Views: 353 It should be, yes. You can define functions and classes withing an if block if you need to.
Doing something like this is pretty common:
<?php
if(!function_exists('myFoo')) {
function... |
Forum: PHP 24 Days Ago |
| Replies: 12 Views: 511 Hey.
In a properly designed CMS, changing anything just INSERTs, UPDATEs or DELETEs stuff from the database. If it is actually creating tables, or otherwise changing the database structure, there... |
Forum: PHP 24 Days Ago |
| Replies: 4 Views: 281 Hey.
The fact that the file ends in .php means absolutely nothing to a RSS feed reader. (Or rather; a RSS reader worth using.)
As far as they are concerned, if it acts like a XML file (uses a XML... |
Forum: PHP 25 Days Ago |
| Replies: 14 Views: 664 Just to underline how much easier it is to work with libraries like Prototype and jQuery, this is how ardav's "doForm1" function would have looked like in native JavaScript:
function doForm1(){
... |
Forum: PHP 26 Days Ago |
| Replies: 2 Views: 251 Hey.
LAMP is a collection of popular web-sever technologies, which collectively make up the core of a majority of HTTP servers running today.
It typically stands for:
Linux
Apache
MySQL
... |
Forum: PHP 26 Days Ago |
| Replies: 5 Views: 440 Hey.
Just thought I would point out that both the code examples above are wide open to SQL Injection (http://php.net/manual/en/security.database.sql-injection.php).
You two are probably aware of... |
Forum: PHP 26 Days Ago |
| Replies: 3 Views: 290 Hey.
I'm happy to help you write the code, but I am not going to do it for you. You are going to have to do the heavy-lifting. After all, this is your project, and we are only here to help.
... |
Forum: PHP 29 Days Ago |
| Replies: 4 Views: 346 Ok, that's fairly simple using jQuery.
For example, if you wanted to copy the value of one <input> to another before submitting, you could do:
<!DOCTYPE html>
<html>
<head>
... |
Forum: PHP 29 Days Ago |
| Replies: 14 Views: 510 So it is displaying the data as if it were still yesterday?
Where is your SQL server hosted? In your timezone?
I ask because I have test server hosed on a timezone 6 hours later than where I... |
Forum: PHP 30 Days Ago |
| Replies: 14 Views: 510 Hey.
A single LEFT JOIN should be able to do that.
Consider this:
<?php
// Open a database connection
$dbLink = new mysqli('host', 'usr', 'pwd', 'dbName');
if(mysqli_connect_errno()) { |
Forum: PHP 31 Days Ago |
| Replies: 109 Views: 3,746 CRC is a non-secure hashing algorithm, used to verify data integrity. It has no place in security algorithms.
Even if you re-hash the output of crc32 using a stronger hashing algorithm, you aren't... |
Forum: PHP 32 Days Ago |
| Replies: 2 Views: 304 Hey.
I just have a couple of suggestions.
#1
Your $_SESSION['cart'] element. You can use session elements as arrays. There is no need to serialize all the items into a single element.... |
Forum: PHP 33 Days Ago |
| Replies: 5 Views: 575 That's a bit tougher, because it's very hard to keep accurate track of your users, short of requiring that people register and log in before voting.
A popular method is to record the user's IP... |
Forum: PHP 33 Days Ago |
| Replies: 5 Views: 575 Hey.
Do you have some sort of a database? Like MySQL?
If not, you could use a CSV file to store the data.
For example, I wrote this a while back. Does pretty much what you were talking about:... |
Forum: PHP 33 Days Ago |
| Replies: 31 Views: 3,748 Ok. So I've been messing around, creating a JavaScript object that draws lines between the IDs in my tree-view code. Might help you.
This is basically the same code I posted before, with minor... |
Forum: PHP 34 Days Ago |
| Replies: 109 Views: 3,746 Yea, I actually solved P versus NP last weekend. Wasn't anything good on TV and my PC was busy compiling...
But I can't find my notebook now. Think my dogs got it.
O, well. What'cha gona do :P |
Forum: PHP Nov 10th, 2009 |
| Replies: 14 Views: 543 IDs of elements don't work like the names of input elements. If you have two elements with the same ID, only one of them will be used by JavaScript. (The last one, I believe.)
So you need to... |
Forum: MySQL Nov 8th, 2009 |
| Replies: 6 Views: 573 UTF-8 (utf8_general_ci) should work fine for that. Even for the Chinese characters.
I've created blog software in the past, using UTF-8, that I used to post content in multiple languages,... |
Forum: PHP Nov 8th, 2009 |
| Replies: 2 Views: 260 Hey.
HTML:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf8">
</head>
<body /> |
Forum: PHP Nov 7th, 2009 |
| Replies: 14 Views: 410 Hey.
If you are having problems with functions, look them up in the manual (http://php.net/imagewbmp).
The third parameter of the imagewbmp (http://php.net/imagewbmp) function is not the same... |
Forum: PHP Nov 4th, 2009 |
| Replies: 4 Views: 243 As an afterthought...
The mail function does allow for multiple recipients for one call.
If you pass something like User1 <user1@example.com>, User2 <user2@example.com> as the first parameter,... |
Forum: PHP Nov 4th, 2009 |
| Replies: 10 Views: 333 Yes, sorry about that second post. When I posted my first post it got posted twice because of a bug in the forum. (I assume)
It has been removed now.
But OK, as form validation is a rather... |
Forum: PHP Nov 3rd, 2009 |
| Replies: 7 Views: 314 You could even simplify it further:
<?php
$dat = intval(@$_GET['day']);
if($dat < 1 || $dat > 7) {
$dat = date('N');
}
include("test{$dat}.html");
?>
The intval function always returns a... |
Forum: PHP Nov 2nd, 2009 |
| Replies: 11 Views: 508 As far as I know, there is no way for the old MySQL extension to execute multiple procedures. Not without using multiple connections, which is a horrific idea.
You would have to be able to fetch... |
Forum: PHP Nov 1st, 2009 |
| Replies: 16 Views: 536 In your class the auth, checkempty and adduser methods should ideally not echo HTML, but rather return a boolean or an error code.
The displogin method also echoes HTML, but it can hardly be... |
Forum: PHP Oct 31st, 2009 |
| Replies: 9 Views: 342 I'm happy to help you write the code, but I am not going to do it for you. This is your project and I am only here to help. You are going to have to do the heavy-lifting.
Have you even tried to do... |
Forum: PHP Oct 27th, 2009 |
| Replies: 7 Views: 299 The mysql_real_escape_string (http://php.net/mysql_real_escape_string) function would be better. It does more than just add slashes, it escapes any char that would mess up the query.
It should be... |
Forum: PHP Oct 27th, 2009 |
| Replies: 3 Views: 195 Hey.
Check the apache error log. See if it gives you a more detailed error message. Not entirely sure where Apache is located under WampServer, but the file is called error.log.
Can't really... |
Forum: PHP Oct 27th, 2009 |
| Replies: 7 Views: 299 Hey.
Also, on line #15 you use the mysql_affected_rows (http://php.net/mysql_affected_rows) function, where you should be using the mysql_num_rows (http://php.net/mysql_num_rows) function.
The... |
Forum: PHP Oct 21st, 2009 |
| Replies: 6 Views: 305 Hey.
Yea, you typically get this warning if you leave out the $, as network18 suggested, or when you forget the quotes around a string.
In either case, PHP will assume it is a string who's quotes... |
Forum: PHP Oct 21st, 2009 |
| Replies: 2 Views: 254 Hey.
Have you attempted this yourself?
If so, what have you tried?
I'm happy to help you fix problems in your code, or help you in your search for a way to do something, but I don't hang out... |
Forum: PHP Oct 21st, 2009 |
| Replies: 1 Views: 261 Hey.
First of all, you need to Validate Your HTML (http://validator.w3.org). It is all mest up. You don't even have a body tag, and a bunch or random attributes that mean nothing.
Please fix... |
Forum: PHP Oct 20th, 2009 |
| Replies: 18 Views: 609 Are you absolutely sure you have the right paths set up?
I've tested the code, using different file paths, on my test server and it seems to work fine there.
The move_uploaded_file function, as... |
Forum: PHP Oct 20th, 2009 |
| Replies: 18 Views: 609 Hey.
There are a couple of things in that code that I would like to point out.
First, the variables you use the htmlspecialchars function on.
What that function does is prepare the fields for... |