Search found 44 matches

by derchris
Tue Jun 13, 2006 5:23 pm
Forum: PHP - Code
Topic: Pulling Contents from a file
Replies: 9
Views: 1658

Then I would use PHP functions instead of calling a system program.
by derchris
Tue Jun 13, 2006 5:19 pm
Forum: PHP - Code
Topic: PHP Remote Form Help
Replies: 11
Views: 1925

You say that three of the hidden fields never change.
But why do you Include them in the form?
Why not put them in the script, so that nobody sees them if it a user / password you need.
by derchris
Mon Jun 12, 2006 2:33 pm
Forum: Databases
Topic: Problems with ORDER BY
Replies: 4
Views: 1274

Perfect, now he is sorting it right.

Thanks :D
by derchris
Mon Jun 12, 2006 9:54 am
Forum: PHP - Code
Topic: Value of last row of query??
Replies: 8
Views: 2741

But $num is only the numer of rows.
If you want to have a value from a row, you have to use $row['bla'], bla - the colum you are looking at.
With $num you have the total rows, so you know which is the last row.
Then only do a query on the last row.
by derchris
Mon Jun 12, 2006 9:51 am
Forum: Databases
Topic: PHP used with Oracle
Replies: 1
Views: 817

You have to use either OCI or ORA.
There is no other way, at least I'm not aware off.
by derchris
Mon Jun 12, 2006 9:46 am
Forum: PHP - Code
Topic: Value of last row of query??
Replies: 8
Views: 2741

You already have a value for $num, so $last = $row[$num]; won't work, and is also wrong. It would be $last = $row['num']; Anyway: $sql3 = "SELECT page_id FROM $table"; $result3 = mysql_query($sql3) or die ("Couldn't perform query -".mysql_error()); $row = mysql_fetch_array($resul...
by derchris
Mon Jun 12, 2006 9:41 am
Forum: PHP - Code
Topic: htaccess
Replies: 8
Views: 1402

The .htaccess thing won't work, as the User would never see an Image in their Browser.
I would move all Images to a folder outside of the webroot, and do it with PHP instead.
by derchris
Mon Jun 12, 2006 4:03 am
Forum: Databases
Topic: Problems with ORDER BY
Replies: 4
Views: 1274

Will try that.

Thanks.
by derchris
Mon Jun 12, 2006 3:42 am
Forum: PHP - Code
Topic: $_FILES submit hanging
Replies: 4
Views: 2218

But there is no Script.

How should the form know what to do with the file if there is no script which can process the POST data ?
by derchris
Mon Jun 12, 2006 3:39 am
Forum: PHP - Code
Topic: Unload an extension
Replies: 7
Views: 2731

Only if the extension has an attribute for that.
Like:

extension.bla_enabled = 0/1 in php.ini

Then you can set it in runtime by:

Code: Select all

ini_set("extension.bla_enabled", "0");
by derchris
Sun Jun 11, 2006 6:54 pm
Forum: PHP - Code
Topic: $_FILES submit hanging
Replies: 4
Views: 2218

What about the rest of the Script ?
by derchris
Sun Jun 11, 2006 6:53 pm
Forum: PHP - Code
Topic: problem with session_start()
Replies: 7
Views: 1857

and what about this: <?php session_start(); function Login($username, $password) { // If user was in the middle of filling out new account form, // and decided to login, then clear all the junk the user filled out. if ($_SESSION['signup_account']) { session_start(); session_destroy(); // line 11 } }...
by derchris
Sun Jun 11, 2006 5:28 pm
Forum: Databases
Topic: Problems with ORDER BY
Replies: 4
Views: 1274

Problems with ORDER BY

Yes, I have some issues with ORDER BY. First my code: if(isset($_POST['viewlist'])) { $orderby = $_POST['orderby']; $ascdesc = $_POST['ascdesc']; @mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS) OR die(mysql_error()); mysql_select_db(MYSQL_DATABASE) OR die(mysql_error()); $sql = "SELECT * FRO...
by derchris
Sun Jun 11, 2006 4:34 pm
Forum: PHP - Code
Topic: Item Handling with Database [SOLVED]
Replies: 15
Views: 3316

@mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS) OR die(mysql_error()); mysql_select_db(MYSQL_DATABASE) OR die(mysql_error()); $sql = "SELECT * FROM `items` WHERE username='user1' "; $result = mysql_query($sql) OR die(mysql_error()); if(mysql_num_rows($result)) { echo "<table borde...
by derchris
Sun Jun 11, 2006 3:46 pm
Forum: PHP - Code
Topic: Item Handling with Database [SOLVED]
Replies: 15
Views: 3316

I thought you know how do use it 8O

Code: Select all

SELECT * FROM `items` WHERE username='user1'