Search Results

Showing results 1 to 40 of 57
Search took 0.01 seconds.
Search: Posts Made By: Atli ; Forum: PHP and child forums
Forum: PHP 2 Days Ago
Replies: 3
Views: 184
Posted By Atli
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 8 Days Ago
Replies: 2
Views: 239
Posted By Atli
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: 179
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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: 351
Posted By Atli
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: 510
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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,741
Posted By Atli
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: 303
Posted By Atli
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: 572
Posted By Atli
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: 572
Posted By Atli
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,737
Posted By Atli
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,741
Posted By Atli
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
Posted By Atli
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: PHP Nov 8th, 2009
Replies: 2
Views: 258
Posted By Atli
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: 408
Posted By Atli
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
Posted By Atli
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
Solved: validation
Views: 332
Posted By Atli
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
Posted By Atli
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: 507
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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
Posted By Atli
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...
Forum: PHP Oct 19th, 2009
Replies: 20
Views: 644
Posted By Atli
Hey.

Have you searched online for tutorials? There are probably hundreds of PHP/MySQL tutorials available online.

I always liked the one at w3schools.com...
Showing results 1 to 40 of 57

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC