Sorry to cram all this in one message, but it's all on my mind, any help is greatly appreciated.
First, can PHP output its processing to a text file, such as building an HTML file, but saving it, instead of just working it on the fly? Or would CGI be better for that?
Second, I have an html form, that is accepting input from the user to pass along and insert into a table, my problem/question involves accepting input from the user in the proper format. Take this table layout for instance:
---------- tbltest ----------
first_name VARCHAR(30)
last_name VARCHAR(30)
birthdate DATE
description BLOB
First Name : <input type=text name=first_name size=30 maxlength=30>
Last Name : <input type=text name=last_name size=30 maxlength=30>
#### Down to this point works with no problems ####
Birth Date : <input type=date name=birthdate>
#### For birthdate, is there anyway to tell the form to accept only a certain format, or would it just be easier to request a YYYY in one box, MM in another, and DD in the last and put them together in the order I want before sending them to mysql? ####
Description :
#### In the description area is where I really have my main question, what is the proper "type" that I can use to provide a bigger text box (much like the one I'm typing in now for this message, with scrollbar) ? I did have type=text maxlength=255, but that doesn't work too well, as some of my descriptions are larger than 255 chars. ####
2) I can remember the exact command right now, but php has several commands to either check if it is a valid date and to convert it between formats. If nothing else will work for you, just set up a little case statement, that checks what format the date was entered in and then converts it.
3) Why not just use a type TEXT? That can be of arbitrary length...
Christian
------------------
Axie automatically performs free, customizable searches for new
websites and delivers the links to members by personalized email. http://www.axie.com/
Will using type=text just put a text box up there (with multiple lines)? I see in the source of this 'reply to topic' page that they use TEXTAREA, I think I'll give that a try.
Thanks for the answers 1 & 2, I'll work on those as well.
Mike
------------------
My new position : Target for Middle Management Hostility.
The type=text refered to the mySQL table entry that would hold the info...
Christian
------------------
Axie automatically performs free, customizable searches for new
websites and delivers the links to members by personalized email. http://www.axie.com/
I have the same thing on my site where a date is needed in a form. The best thing to do is make the form fields drop down boxes. Therefore the visitor has make a choice of day (1-31), month (Jan-Dec)and even year if you like. This would then be submitted in a format that you have control over.
If you need the html for this, just leave a message here.
Bookmarks