[PHP] php and mysql

2003-03-31 Thread Tyler Durdin
I have a db with events in it. i would like to pull the events out via php, but i would like them to be ordered by month number (1-12). When I do this (Select blah blah From blah Order By Month_Start ASC) it orders the months by number, but it starts with october (month 10) I am pretty sure it

[PHP] image upload question

2003-03-12 Thread Tyler Durdin
I want to be able to resize an image to 331x248 when I upload it and also create a thumbnail. All of these pics are coming from a digital camera set on 800x600 so the dimension above should be fine and i would like the thumbnail to be 77x58. I know the code to upload the image, but I am not

RE: [PHP] image upload question

2003-03-12 Thread Tyler Durdin
Nothing really. I did happen across a couple of tutorials from phpbuilder.com    http://www.phpbuilder.com/columns/michael20020712.php3?print_mode=1 and    http://www.phpbuilder.com/columns/bealers2904.php3?page=3print_mode=1 may be able to piece something together from these two articles.

[PHP] updating pages with php

2003-03-05 Thread Tyler Durdin
I have a web page with a simple introductory paragraph on it. I was going to store the paragraph in a mySQL DB and create an administration page so people could easily edit the paragraph itself or change it all together. The problem I ran into is that mySQL will not allow certain punctuation

RE: [PHP] updating pages with php

2003-03-05 Thread Tyler Durdin
it gives me errors. I take them out of the sql text and webpage and it works fine. From: John W. Holmes [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: 'Tyler Durdin' [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: RE: [PHP] updating pages with php Date: Wed, 5 Mar 2003 13:23:00 -0500 I have a web

Re: [PHP] updating pages with php

2003-03-05 Thread Tyler Durdin
$Query = UPDATE $TableName SET Intro_Title = '$Intro_Title', Intro = '$Intro' WHERE ID = '$ID'; From: Liam Gibbs [EMAIL PROTECTED] To: php list [EMAIL PROTECTED] Subject: Re: [PHP] updating pages with php Date: Wed, 5 Mar 2003 13:33:11 -0500 What I have discovered is that I can manually

Re: [PHP] updating pages with php

2003-03-05 Thread Tyler Durdin
They are all text fields. Intro title is just a line of text that says Welcome to this website... Intro, is the text of the introduction. You are correct and it is apostophe's and not comma's that cause the error. What do I do to get around that? From: Liam Gibbs [EMAIL PROTECTED] To: php

[PHP] php and mysql

2003-02-20 Thread Tyler Durdin
When using a php script to pull recorda from a db how can I cut the records at 1/4 of the total and arrange them alaphabetically according to a certain field? Thanks in advance. _ MSN 8 helps eliminate e-mail viruses. Get 2

[PHP] basic question

2003-02-14 Thread Tyler Durdin
What is the most secure way to access a mysql db with a php script? And could someone provide an example? What are the best password practices for the script to connect to the mysql db? Also, how should I set the directory permissions for the html pages with php scripts?

[PHP] Upload file

2003-01-23 Thread Tyler Durdin
I am using PHP 4.2.1 and have noticed that I can only upload files with a php script when I have the php.ini file set with register globals on. Is there a way to use the file upload scripts without having to turn the register globals on? How about newer versions of PHP?

[PHP] php and databases

2002-10-25 Thread Tyler Durdin
Is there anyway to have php convert a database from mySQL to Access via a webpage? I have a couple of people here who use Access to do mail merging things with word and it would make my life a ton easier if I did not have to convert the db's everytime they want the info. If anyone has any

Re: [PHP] SQL ?

2002-08-12 Thread Tyler Durdin
List [EMAIL PROTECTED] Subject: Re: [PHP] SQL ? Date: Mon, 12 Aug 2002 10:26:55 -0400 On Mon, Aug 12, 2002 at 02:15:23PM +, Tyler Durdin wrote: SELECT *, IF (answer = 'a', TRUE, FALSE) AS Answer-A What does the As Answer-A mean and what does it do? Why not examine the manual

Re: [PHP] SQL ?

2002-08-12 Thread Tyler Durdin
my post as it was a justified. If we have nothing nice or helpful to post to one another, then we should post nothing at all. From: DL Neil [EMAIL PROTECTED] To: Tyler Durdin [EMAIL PROTECTED],[EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP] SQL ? Date: Mon, 12 Aug 2002 15:49:45 +0100

[PHP] records in db

2002-08-10 Thread Tyler Durdin
If I have a field in my DB that can have 4 different answers, lets say a,b,c and d. How can I count the number of each in that field. So if there are 4 a's 1 b 0 c's and 12 d's how can I get php to count this? _ MSN Photos is the

[PHP] sessions

2002-08-01 Thread Tyler Durdin
I have a login page using sessions the old way. I have switched it to using $_SESSION['valid_user']and was wondering how to switch this (below) part of my code. In the if statement I am checking to see if the session is registered, but using $_SESSION[''] I do not understand how to do this or

[PHP] inserting info into db

2002-07-29 Thread Tyler Durdin
I have a DB that will take answers to an 82 question survey, but i have the survey divided into 4 html pages(forms) of 20 or so question per page. The people taking the survey are not required to fill out every question on the survey. i was wondering how i can insert the data into the db this

[PHP] comparing a variable to value in DB

2002-07-29 Thread Tyler Durdin
I have a column in my DB named username and i am trying to compare a session ID called $username to the field in my DB called username. The way i had done it before was SELECT * from tablename WHERE Tablename.username == $username, but this does not seem to be working is there a better way to

Re: [PHP] still on sessions

2002-07-26 Thread Tyler Durdin
Alright this is my last question. I have closed the session, but can i make sure it is closed? i want to use something like if the session is closed then print a message session closed. _ Send and receive Hotmail on your mobile

Re: [PHP] Re: sessions

2002-07-26 Thread Tyler Durdin
So doing it the new way ($_SESSION['variable']) how do you close or unregister a session? _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Re: sessions

2002-07-26 Thread Tyler Durdin
Still the same message. It has been actually logging me out all along, but it will not run through that if statement. Could you trye if (!empty($HTTP_SESSION_VARS['valid_user']) use $HTTP_SESSION_VARS _ Chat with friends

Re: [PHP] Re: sessions

2002-07-26 Thread Tyler Durdin
Still getting the same message. This script used to work perfectly in an older version of php. Could it be a problem with how I am setting the sessions. Has anything changed with how we code sessions? It's because you are unregistering the valid_user variable, but, the old_user var you

Re: [PHP] sessions

2002-07-26 Thread Tyler Durdin
Here is the code that starts and registers the session. It is login page that logs in to itself so the form that produces $_POST[username] is actually on the same page, but nothing happens until the user logs in. It there is something in this code that is not correct or making the other code

[PHP] sessions

2002-07-26 Thread Tyler Durdin
I used this logout page using sessions a while ago and it used to work great, but now it doesn't work. The only thing i have changed is my version of php. Can someone take a look and see what i have to change? ? session_start(); $old_user = $valid_user; $result =

Re: [PHP] sessions

2002-07-26 Thread Tyler Durdin
yes they are off. I did just recently discover this whole form thing, but i did not know about the session variables. I put the session registration code up in another post, if you would not mind looking at that and recommending changes. in the mean time I'll try and get up to speed on the

RE: [PHP] php redirect

2002-07-26 Thread Tyler Durdin
I already tried that and i got an error that said Cannot add header information - headers already sent by (another snippet of code I have in the page. Use the header() function http://www.php.net/manual/en/function.header.php *

Re: [PHP] sessions

2002-07-26 Thread Tyler Durdin
I don't know. Tell me where I would find it and I'll look : -) Sorry, pretty new to all of this. Do you have register globals off? Jim Grill Support Web-1 Hosting http://www.web-1hosting.net - Original Message - From: Tyler Durdin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday

[PHP] still on sessions

2002-07-26 Thread Tyler Durdin
alrigh I have switched everything over to the $_Session['variable'] style of session. Next question, I have a little script that used to check if the session was registered and if it was not it would redirect to the login page. How do i accomplish this now that i cannot check if the session is

[PHP] pulling records from mysql

2002-07-25 Thread Tyler Durdin
I have a column in my table named firstname with twenty records in it. How can i use php to pull out individual records (say for ex. record 16)? Also, how could i pull out all records upto number 15? Thanks in advance. _ Send

[PHP] printing results from mysql fetch array

2002-07-25 Thread Tyler Durdin
If I select all from my db how can I print the individual results? For example, say i want to print record number 16 from the firstname column into a table. How can i accomplish this? I have all of my db access coded and have it selecting all from the db, but i want to print individual records