| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
with a hint of lemon
Join Date: Aug 2006
Location: Sheffield
Posts: 500
|
PhP Questions
Hey everyone, i'm testing my new site, and so far so good, all validates and runs smoothly, into these i've also been havin a proper dap at PhP, i've been trying to learn anyways lol, However there to two questions i need answering: 1) How do i get only the last three entries into a database to display, also with the last first, hoowever i am assuming it will still be SELECT * FROM 'example' ORBER BY DESC 2) How would i get a file uploaded, and depending on what checkbox is checked depends were the file is uploaded to! Cherrs and nite, its 00:51 and i'm knackered! Online portfolio: mgpwr.co.uk
|
|
|
|
|
|
#2 (permalink) | ||
|
Registered User
Join Date: Feb 2007
Posts: 31
|
Quote:
SELECT * FROM 'example' ORBER BY DESC LIMIT 3 Quote:
Do you want it to be uploaded to more than one directory? If so then you can use a foreach statement with your check boxs. By making the name variable[] when you grab the variable php will see it as an array. Then you can use the foreach statement. |
||
|
|
|
#3 (permalink) | |
|
Senior Member
Join Date: Jan 2005
Posts: 12,340
|
Quote:
Preemptive: I know he's using MySQL, but just a warning in case he moves to MSSQL or PostgreSQL sometime. |
|
|
|
|
#4 (permalink) |
|
with a hint of lemon
Join Date: Aug 2006
Location: Sheffield
Posts: 500
|
No, it will only be going to one place at a time, its so i can start getting a simple CMS for my website, i log in, and when i fil out the portfolio update, i can select what folder the pics go in, i.e a thumbnail in the smallpics flder and the large picture in the ... wait can you guess.. largepicfolder lol... Online portfolio: mgpwr.co.uk
|
|
|
|
#6 (permalink) | |
|
Registered User
Join Date: Feb 2007
Posts: 31
|
Quote:
Then I would just use a radio button. give the a name such as 'folder' and each one a different value, ie) 0,1,2. Then in your script you can tell it to upload to a certain fold by checking that variable. |
|
|
![]() |