Search found 23 matches

by Flood
Sat Jun 28, 2003 2:18 pm
Forum: PHP coding => Images
Topic: Image arrangement
Replies: 0
Views: 1559

Hi! I am not sure I have understood your question, but... Loop over your images, create a new row only when you have reached 5 images (=5 columns) on the current row... It sounds a little bit confusing, but the following code should explain it better: <table> <?php for ($i = 0; $i < mysql_num_ro...
by Flood
Sat Jun 28, 2003 2:11 pm
Forum: PHP Jobs
Topic: Please Help me! Hurry Please
Replies: 4
Views: 3049

Hi! Sorry bezmond, but I am the one to correct you... :wink: Here is how it should look like: $query = "DELETE FROM table WHERE username LIKE 'antigozte%'"; mysql_query($query) or die(mysql_error()); You can also do it by date: look for the users who registered the ...
by Flood
Fri Jun 27, 2003 3:53 am
Forum: PHP coding => General
Topic: delete extension from filename
Replies: 0
Views: 721

Hi! When you do the test to know whether it is a .jpg file or not, you use the function substr... substr returns a string but does not alter the string you pass as an argument. In other words, calling substr($nomfichier, -3) will not change anything in the variable $nomfichier... And when you use it...
by Flood
Fri Jun 27, 2003 1:48 am
Forum: PHP coding => General
Topic: how to find the length of a string. ?
Replies: 3
Views: 1100

Hi! Ok it will look 'secure' if thanks to javascript, you display an alert box if the condition you want to be fulfilled (length of a field) is not. But never forget that: 1) javascript is easily bypassed 2) in any case, you also have to check the content/syntax of the received fields in your php sc...
by Flood
Fri Jun 27, 2003 1:26 am
Forum: mySQL & php coding
Topic: problem with passing value through a pull down menu in php
Replies: 1
Views: 742

Hi! In your code if($_POST['DomainMenu'] == $Existing_Domain) $result = mysql_query("SELECT Description FROM Domain where Name = '$Existing_Domain'"); $num_rows = mysql_num_rows($result); If the condition $_POST['DomainMenu'] == $Existing_Domain is true, then you wi...
by Flood
Thu Jun 26, 2003 3:08 pm
Forum: mySQL & php coding
Topic: Working with Date & Time
Replies: 0
Views: 750

Hej! How about <?php $begin_date = strtotime("2003-06-18 13:10:10"); $end_date = strtotime("2003-06-28 14:10:10"); print floor(($end_date - $begin_date) / 3600 / 24); ?> Sure you can optimize it a little bit by computing 3600 * 24 in advance... But...
by Flood
Thu Jun 26, 2003 4:21 am
Forum: PHP coding => General
Topic: form processing and variable retrieval problem
Replies: 1
Views: 742

Hi!

Could you give us your scripts so that we can look deeper in it?

Thanks.

/Flood
by Flood
Thu Jun 26, 2003 3:37 am
Forum: PHP General
Topic: php session doesn't work
Replies: 1
Views: 1082

Hi!

Perhaps it will not change anything, but if I were you, I would use $_SESSION instead of session_register...

Otherwise and in any case, define your variables before calling session_register...

/Flood
by Flood
Thu Jun 26, 2003 3:35 am
Forum: PHP General
Topic: Convert string to "&#ddd;"
Replies: 0
Views: 733

Hi!

Have a look at the function htmlentities

See http://uk.php.net/manual/en/function.htmlentities.php

/Flood[/b]
by Flood
Wed Jun 25, 2003 3:18 pm
Forum: mySQL & php coding
Topic: Most active user
Replies: 4
Views: 1177

Hi! Sorry, I will not fully answer your question (at least not yet). First of all, if I were you and since it seems that you are at the beginning of your project, I would re-design my database: for instance, there might be several titles for a same artist and the way you have designed it will lead t...
by Flood
Wed Jun 25, 2003 11:32 am
Forum: PHP General
Topic: Making A Picture Gallery and an Archive for my pictures!!!
Replies: 2
Views: 1142

Hi!

You can easily find some open source image management on the Web... Try for instance http://www.phpwebgallery.net/!!
No I am not posting it only because it is a friend of mine who wrote it! :wink:

/Flood
by Flood
Wed Jun 25, 2003 11:13 am
Forum: PHP Scripts
Topic: a variable that is undefined
Replies: 3
Views: 1736

Perhaps you are looking for in_array then?
cf. http://www.php.net/in_array

/Flood
by Flood
Wed Jun 25, 2003 11:10 am
Forum: PHP coding => General
Topic: Time triggered PHP?
Replies: 1
Views: 1215

and to complete pootergeist's suggestion with crontab, see http://www.littletechshoppe.com/servers/extensions/cron/crontab_5.html (simple online 'man')

/Flood
by Flood
Wed Jun 25, 2003 11:04 am
Forum: mySQL & php coding
Topic: Having problems emailing query results
Replies: 7
Views: 1930

And are you sure you have set up the right SMTP server name and address? Incidentally, it has nothing to see with your question, nor with PHP... but with HTML... Don't forget the tag <!DOCTYPE at the beginning of your script... Some navigators might guess it, but others don't... cf. http://www.w3sch...
by Flood
Wed Jun 25, 2003 11:03 am
Forum: PHP General
Topic: Hosting on your own server
Replies: 10
Views: 2778

Hi!

Perhaps you should check that the variable ServerName in httpd.conf is not 127.0.0.1... otherwise it will only work locally... By the way, as RedCircle suggested, does it work locally for him, that is by typing http://127.0.0.1 (assuming Apache is running on port 80) in his web browser?

/Flood
by Flood
Wed Jun 25, 2003 10:52 am
Forum: mySQL & php coding
Topic: Having problems emailing query results
Replies: 7
Views: 1930

Tell us what goes wrong... Don't you receive any mail? Do you get any PHP error?

/Flood
by Flood
Wed Jun 25, 2003 10:50 am
Forum: phpMyAdmin
Topic: limitation of tables
Replies: 1
Views: 1841

Hi! See http://www.mysql.com/doc/en/Features.html Handles large databases. We use MySQL Server with databases that contain 50 million records. We also know of users that use MySQL Server with 60,000 tables and about 5,000,000,000 rows. It has never happened to me, I guess that the main problem you c...
by Flood
Wed Jun 25, 2003 10:44 am
Forum: phpMyAdmin
Topic: Deletion of tables
Replies: 1
Views: 2128

Hi! I do not know if I have understood the question properly... Do you want the SQL syntax to delete tables and databases, or do you want to know how to do it using phpmyadmin? I will begin with the second option... Just follow the right path through the interfaces of phpmyadmin Select a database, y...
by Flood
Wed Jun 25, 2003 10:33 am
Forum: mySQL & php coding
Topic: Having problems emailing query results
Replies: 7
Views: 1930

Hej!

Try to put the value for the field in-between apostrophes
-->
$sql = "SELECT * FROM authuser WHERE email = '{$_POST['uemail']}'";

Hope it will solve the problem.

/Flood
by Flood
Wed Jun 25, 2003 9:02 am
Forum: mySQL & php coding
Topic: sql syntax does not give me the required output
Replies: 4
Views: 1481

Hello! First of all, as Liquedus said, I think your database should be designed again from scratch. And if not, you should at least add an identifier for the properties in order to avoid redundancies in fields between product_property and property... But anyway, here is a solution that works. Perhap...
by Flood
Wed Jun 25, 2003 8:36 am
Forum: mySQL & php coding
Topic: SQL Query
Replies: 1
Views: 1039

hi! I guess you should have something like: SELECT g.groupid, groupname, grpdesc, COUNT(m.groupid) FROM tblGroups g, tblMessages m WHERE g.groupid = m.groupid GROUP BY g.groupid; I have written it pretty quickly, I might have mistaken... but the general idea is to use GROUP BY... If there are no mes...
by Flood
Wed Jun 25, 2003 8:30 am
Forum: mySQL & php coding
Topic: newbie: making html data in one form available in others
Replies: 3
Views: 1579

Hi! Just a couple of ideas coming to my mind: - saving information in cookies/sessions - hiding information in hidden items (cf. <input type="hidden" ... />) - saving information in a file on the server side I guess that is not really good ideas, but what an idea to have 4 different forms! ;-) /Flood
by Flood
Tue Jun 24, 2003 5:00 am
Forum: mySQL & php coding
Topic: MySQL vs recursion
Replies: 1
Views: 779

MySQL vs recursion

Hi! I would define my problem as a classic one, but I have not found any way to solve it yet. It deals with SQL and recursion. Let's assume that I want to create my own forum. A forum is defined by a set of categories, a set of subcategories for each of those categories, a set of subsubcategories an...