[PHP] Re: registering a session variable from a select statment.

2002-03-05 Thread Lerp
Hi there :) Try something like this: session register (user_auth_level); $user_auth_level = $user_level; HTH, Joe :) Matthew Darcy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]; Hi, I have a user auth script. Very simple and works. when I check the username and password I

[PHP] Re: registering a session variable from a select statment.

2002-03-05 Thread Lerp
Ammendment: You'll have to dump that value (the user's level) into a variable called user_level first. HTH Joe :) Lerp [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]; Hi there :) Try something like this: session register (user_auth_level); $user_auth_level = $user_level

[PHP] Re: Form Annoyances

2002-02-27 Thread Lerp
Hi there :) Use the addslashes() function prior to insertion to database, and stripslashes() on retrieval from db before you display it. //prior to db insertion $myvar = addslashes($myvar); //on retrieval $myvar = stripslashes($myvar); Since you are wanting to display it to the user before

[PHP] Re: php - assigning date variables

2002-02-25 Thread Lerp
Hi there :) 1. mysql_query(SELECT * FROM table WHERE date ='$mydate'); # where date is same 2. mysql_query(SELECT * FROM table WHERE date '$mydate'); # where date is newer 3. mysql_query(SELECT * FROM table WHERE date '$mydate'); # where date is older 4.mysql_query(SELECT * FROM table

[PHP] Re: Uploading Files with PHP

2002-02-22 Thread Lerp
s:[EMAIL PROTECTED]... Joe, Do you know when the file size is checked ?? I think it only gets checked after the form is posted and file uploading is finished ?? I don't know how it's possible to catch things before user uploads - now that would be neat :-) Jim. Lerp [EMAIL PROTECTE

[PHP] Re: Uploading Files with PHP

2002-02-22 Thread Lerp
Ammendment: Actually, I was just looking at one of my photoupload processes and I actually removed the MAX_FILE out of the upload form and only tested the file size on the processing page like in the previous message. Cheers, Joe :) Lerp [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED

[PHP] Link Inquiry

2002-02-07 Thread Lerp
Hi there, been thinking about how to retrieve all links on a webpage. How would I go about grabbing all links from a particular page? Thx Joe :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Link Inquiry

2002-02-07 Thread Lerp
Thx Julio :) Lerp [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi there, been thinking about how to retrieve all links on a webpage. How would I go about grabbing all links from a particular page? Thx Joe :) -- PHP General Mailing Li

[PHP] Re: Upload script with user admin

2002-02-01 Thread Lerp
. If not, redirect them to another page like in the example below: HTH Joe :) if (!isset($HTTP_SESSION_VARS[islogged])){ header(Location:index.php); } Lerp [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi there, here's a bit of code to get you

[PHP] Re: Escaping a double-quote problem

2002-02-01 Thread Lerp
Look up addslashes and stripslashes in the manual. Normally you'd use addslashes going into the db, and stripslashes coming out for display. HTH Joe :) Anton Kolev [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Any idea why when I print the value of $text, I

[PHP] Re: Upload script with user admin

2002-02-01 Thread Lerp
. Hope this helps you out :) Joe/ Lerp :) ##grab records from db $connectionToDB = odbc_connect(gdff, jgdfoldff, jdfdfgrf); $sqlp = SELECT photoid, caption, datesubmitted FROM PHOTO WHERE golferid='$sesgolferid

[PHP] Re: Problems with date function

2002-02-01 Thread Lerp
($gamedate, 0, 4); //print $year . BR; $gamedateinsecs = mktime(0,0,0,$month, $day, $year); $formattedgamedate = date('F j Y',$gamedateinsecs); //print $formattedgamedate; Hope this helps you out :) Joe / Lerp :) Jorge Arechiga [EMAIL PROTECTED] wrote in message

[PHP] Re: How do I use a confirm box to confirm before deletion from a database

2002-01-28 Thread Lerp
Hi Ivan, I've this a number of times. What I suggest is that you have two forms, each with a button on the page that receives the delete request. Both forms post to the processing page. The first button passes a value called dodelete and the second one passes another value say, dontdelete. On the

[PHP] Re: Image Fields and PHP...

2002-01-17 Thread Lerp
Hi again, I guess one really good reason for not storing images directly in a db table is performance. When you store a blob in a table it affects the whole database's performance. It slows it down, that's why the most common method is to store the images in a dir on the webserver and store only

[PHP] Re: Image Fields and PHP...

2002-01-16 Thread Lerp
Hi Zara, are you storing a path to the images in your db? Or the actual image? It's recommended that you stay away from storing actual images in the db. If you are storing a path the code below might help you out. It select a firstname, and an image according to an id. You'll have to change the

[PHP] Paging using arrays Question

2002-01-11 Thread Lerp
Hi there, I have a db with only one table in it called CONSULTANT. I'm using sqlServer and would like to do record paging, say 5 at a time. I'm aware that sqlServer doesn't support the LIMIT statement so I've decided to do it using arrays. So I've written the appropriate query statement, managed

[PHP] Form Question

2002-01-10 Thread Lerp
Hi there, how do I keep values in a form if the user has to go back and fill in some missing fields? Thx Joe :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators,

[PHP] Display Problemo

2001-11-20 Thread Lerp
with the actual a href tag. Thx in advance, Lerp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP] Re: kill a session...

2001-11-20 Thread Lerp
session_start(); /unset any session variables session_unset(islogged); /kill the session session_destroy(); HTH Joe:) Romeo Manzur [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Somebody know how to kill a session when a user left the page??? -- PHP