Search Results

Showing results 1 to 40 of 414
Search took 0.03 seconds.
Search: Posts Made By: Atli
Forum: PHP 12 Hours Ago
Replies: 12
Views: 220
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 17 Hours Ago
Replies: 33
Views: 2,096
Posted By Atli
The problem is that the code relies on your browser to correctly align the <div> elements. When the tree is wider then the browser window, the browser automatically re-arranges the <div> elements to...
Forum: PHP 17 Hours Ago
Replies: 33
Views: 2,096
Posted By Atli
The problem you posted in post #29 doesn't seem to be related to the topic we are discussing in this thread. You should post it into it's own thread. Discussing two topics in a single thread gets...
Forum: PHP 1 Day Ago
Replies: 12
Views: 220
Posted By Atli
True, that might be a problem. Although I have never really found to much data to be a problem :)
It could even help you refine your process; being able to see if a lot of people are abandoning it...
Forum: PHP 1 Day Ago
Replies: 12
Views: 220
Posted By Atli
Hey.

You could use sessions to store the data from the first part of the form until the second one is submitted.

Or you could insert the data from the first page into the database as soon as it...
Forum: PHP 1 Day Ago
Replies: 2
Views: 122
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 1 Day Ago
Replies: 5
Views: 150
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 1 Day Ago
Replies: 2
Views: 124
Posted By Atli
Hey.

The preg_replacefunction would be better for that. The preg_matchfunction is used to search a string, not change it. (Not directly at least.)

You would have to create a regular expression...
Forum: PHP 1 Day Ago
Replies: 1
Views: 95
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 1 Day Ago
Replies: 3
Views: 213
Posted By Atli
Ahh yea, sorry. I should have explained that a little better.

You can use the <input> elements just like you would a normal variable within PHP, and once it is submitted, it will appear as an...
Forum: PHP 1 Day Ago
Replies: 2
Views: 144
Posted By Atli
Hey.

My spelling is particularly bad today, so let me just offer this example :)

<?php
// Check if the stat has already been selected
// and saved into the cookie...
Forum: PHP 2 Days Ago
Replies: 14
Views: 325
Posted By Atli
You are using the imagewbmp (http://php.net/imagewbmp) function incorrectly.

The third parameter of the imagewbmp (http://php.net/imagewbmp) function sets the foreground color of the image to a...
Forum: PHP 4 Days Ago
Replies: 14
Views: 298
Posted By Atli
That's great! Glad it worked out :)
Forum: PHP 4 Days Ago
Replies: 4
Views: 158
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 4 Days Ago
Replies: 4
Views: 158
Posted By Atli
Hey.

You should not stack forms like that. It is considered invalid HTML, so you can't really rely on browsers treating them consistently.

Both IE7 and Firefox, for instance, flat out refuses...
Forum: PHP 4 Days Ago
Replies: 14
Views: 298
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 4 Days Ago
Replies: 14
Views: 298
Posted By Atli
Try moving the AND clause into the LEFT JOIN.
Like:

SELECT
j.jobs_id,
j.jobs_description,
d.jobs_done_id,
d.jobs_timedone,
d.jobs_comment,
d.jobs_user
Forum: PHP 4 Days Ago
Replies: 14
Views: 298
Posted By Atli
Ok, I see.

Edit... didn't see that last post. Give me a sec.
Forum: PHP 4 Days Ago
Replies: 3
Views: 156
Posted By Atli
Hey.

You could also do:

if(!empty($_POST['field']) || is_numeric($_POST['field'])) {
// Do your thing.
}

// Or:
if(!empty($_POST['field']) || $_POST['field'] === '0') {
Forum: PHP 4 Days Ago
Replies: 14
Views: 298
Posted By Atli
If you only want the jobs done today, you need to add that to the SQL query.

SELECT
j.jobs_id,
j.jobs_description,
d.jobs_done_id,
d.jobs_timedone,
d.jobs_comment,
...
Forum: PHP 5 Days Ago
Replies: 3
Views: 213
Posted By Atli
Hey.

You can set use the name attribute of an <input> just as you would an array inside PHP. So you can do stuff like:

<?php
$result = mysql_query("SELECT id, name FROM users");

echo '<form...
Forum: PHP 5 Days Ago
Replies: 14
Views: 298
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 6 Days Ago
Replies: 109
Views: 3,285
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 6 Days Ago
Replies: 6
Views: 233
Posted By Atli
You could try PHPMailer (http://phpmailer.worxware.com/) or Swift Mailer (http://swiftmailer.org/). Both are far more powerful than the built in mail() function.

I usually use PHPMailer myself.
Forum: PHP 7 Days Ago
Replies: 5
Views: 254
Posted By Atli
Your welcome.
I'm glad I could help :)
Forum: PHP 7 Days Ago
Replies: 19
Views: 5,243
Posted By Atli
It means that you use a header function (header(), setcookie(), session_start(), etc...) after you started sending content. After you start sending content, the headers can not be modified.

And by...
Forum: JavaScript / DHTML / AJAX 7 Days Ago
Replies: 1
Views: 361
Posted By Atli
Hey.

Creating a simple "tabs" system using AJAX is easy enough. Especially if you use jQuery, or something equivalent.
You could just put the contents of all your tabs in separate HTML files,...
Forum: PHP 7 Days Ago
Replies: 2
Views: 207
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 7 Days Ago
Replies: 6
Views: 233
Posted By Atli
Hey.

To do that, you would need to start by writing the script that checks the database and sends the emails. Then you would have to have your Operating-System execute that script at a given...
Forum: PHP 7 Days Ago
Replies: 4
Views: 214
Posted By Atli
Hey.

The problem is that the variable you use in the inner loop, $c, gets incremented correctly the first loop, giving you a single valid row, but when it comes to the second loop, it is already...
Forum: JavaScript / DHTML / AJAX 8 Days Ago
Replies: 1
Views: 251
Posted By Atli
Hey.

You would have to use AJAX to do that client-side. I wouldn't recommend that, tho. JavaScript can be turned off by the client, so having JavaScript do stuff that needs to happen is not a good...
Forum: JavaScript / DHTML / AJAX 8 Days Ago
Replies: 1
Views: 266
Posted By Atli
Hey.

You just need to change the list-stylefor the <ul> elements. Setting it to list-style: none will hide the bullets.

Like:

<!DOCTYPE html>
<head>
<title>List-Style example</title>
...
Forum: PHP 8 Days Ago
Replies: 2
Views: 255
Posted By Atli
Hey.


It is generally better to use MySQL's DATE and TIME types (http://dev.mysql.com/doc/refman/5.1/en/date-and-time-types.html) to store date or time. Easier to work with it that way.
...
Forum: PHP 8 Days Ago
Replies: 5
Views: 254
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 8 Days Ago
Replies: 5
Views: 254
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 8 Days Ago
Replies: 3
Views: 246
Posted By Atli
Yep, that's pretty much it for MySQL. That is the function, along with it's MySQLi counterpart; mysqli_real_escape_string (http://php.net/mysqli_real_escape_string).
It's also good to keep a look...
Forum: PHP 8 Days Ago
Replies: 33
Views: 2,096
Posted By Atli
P.S.
You can see the above code in action on my test server: http://atli.advefir.com/test/treeview/.
Forum: PHP 8 Days Ago
Replies: 33
Views: 2,096
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 9 Days Ago
Replies: 109
Views: 3,285
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 9 Days Ago
Replies: 109
Views: 3,285
Posted By Atli
A hash is meant to be one way. There is no way to actually guarantee it. True one-way functions are only theoretical at this point.

Not that I don't agree with you; that hashes should be...
Showing results 1 to 40 of 414

 


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

©2003 - 2009 DaniWeb® LLC