[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, e-

[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, manage

[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] 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: 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

[PHP] Re: Upload script with user admin

2002-02-01 Thread Lerp
ment them to see how everything is working. Hoe this helps you out! Joe/Lerp :) Here's a common form that allows you to upload a file (say an image or any type of file for that matter) to the db Upload Photo: #

[PHP] Re: Upload script with user admin

2002-02-01 Thread Lerp
le was set. 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 PRO

[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,

[PHP] Re: Upload script with user admin

2002-02-01 Thread Lerp
ch button was pressed and go from there. For editing the actual path for the image, it is done the same old way, select the record according to an id, dump the values you want changed into a form , edit and post/get it back up the same way it was done the first time around. Hope this helps you out

[PHP] Re: Problems with date function

2002-02-01 Thread Lerp
uot;; $year = substr($gamedate, 0, 4); //print $year . ""; $gamedateinsecs = mktime(0,0,0,$month, $day, $year); $formattedgamedate = date('F j Y',$gamedateinsecs); //print $formattedgamedate; Hope this helps you out :) Joe / Lerp :) "Jorge A

[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] Re: Uploading Files with PHP

2002-02-21 Thread Lerp
Hi there :) Did you set a max file size in your upload form? See my form below, notice the 'MAX_FILE_SIZE' value='102400' part within hidden field. This should appear before the rest of the form. You can adjust this value as you wish. Upload Resume:

[PHP] Re: Uploading Files with PHP

2002-02-22 Thread Lerp
e [EMAIL PROTECTED]">news:[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

[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

[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 t

[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 in

[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

[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 registe

[PHP] Display Problemo

2001-11-20 Thread Lerp
g the code with the actual 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??? > -- PH