Unregistered Avatar

Reply

PHP tutorial request Thread:


 
LinkBack Thread Tools Display Modes

  #1 (permalink)  

Old 09-27-2004, 10:19 PM

PHP tutorial request Thread:

Request php tutorials or Asp tutorials in this thread. Descriptions are great!!!

missionsix is offline loves you.

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,728

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #2 (permalink)  

Old 11-12-2004, 08:26 AM

OK, this one should be pretty simple. I'm just now starting to write my own scripts, but beings I'm only a few days into learning PHP (and get stuck learning switch commands and further ), I'm going to start off with this script to help me learn. I'm trying to write a script so that I can put up a project sheet kind of like what Sicloan has at http://www.missionsix.net only I want to make it dynamic and to be able to work with it through both PHP and MySQL.

First off, I'm going to make a database called cprophet_jd and insert my info with the following query, if it's incorrect, please help me:

Code:
CREATE TABLE  project (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name TEXT,
disc TEXT,
datestart DATE NOT NULL,
datecomp DATE,
comp TEXT
);
One thing I want to know how to do with that query is make it so that "comp" can only be either a "y" or a "n"...haven't learned that far though =/

Well, I want my index.php to create a new row if it reads any new rows in the database (while still reading my CSS file so that the color's don't lose their status)

I also want an admin panel where it can allow me to insert querys such as:

Code:
INSERT INTO project SET
name = "New Skin",
disc = "New skin for CursedProphets",
datestart = "2004-11-11";
Again, I'm not sure if I did that right. I'm not sure if I would need to be able to run DELETE commands...so if I do need to add that in I could just do it myself if I can learn what I'm wanting to out of this.

Oh yeah, I also want to be able to insert completion date and if it's completed or not in the database...perhaps something where I can supply a link of the product?

Help?
__________________
[:: CursedProphets :: BlizzCenter :: VDCore :: MeloDeath :: Battleforums ::]


Cold was my soul
Untold was the pain
I faced when you left me
A rose in the rain....
So I swore to the razor
That never, enchained
Would your dark nails of faith
Be pushed through my veins again

jd-inflames is offline VDC Team Member

Join Date: Feb 2004

Location: Kentucky

Posts: 245

Send a message via AIM to jd-inflames

  #3 (permalink)  

Old 11-14-2004, 01:36 PM

Im working on getting somthing to show you how this could be done, i will edit my post when im done.
__________________
[23:18] J: OH MY GOD DUDE
[23:18] J: you're a fucking tool
[23:18] J: open the fucking drawer
[23:18] J: and right there
[23:18] J: next to the goddamn hammer
[23:18] J: is you
[23:18] J: you fucking tool


Death_Noodle is offline That Stupid Guy.

Death_Noodle's Avatar

Join Date: May 2004

Location: Sacramento

Posts: 774

Send a message via AIM to Death_Noodle Send a message via MSN to Death_Noodle Send a message via Yahoo to Death_Noodle

  #4 (permalink)  

Old 11-14-2004, 02:22 PM

just post a new thread D_N

edit: and i've helped him alot on aim as well... but if you wanna post something go ahead

missionsix is offline loves you.

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,728

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #5 (permalink)  

Old 11-14-2004, 03:09 PM

lol nvm then, its pretty much like my news php script just modified so i dont really need to post anything.

More requests please, lol
__________________
[23:18] J: OH MY GOD DUDE
[23:18] J: you're a fucking tool
[23:18] J: open the fucking drawer
[23:18] J: and right there
[23:18] J: next to the goddamn hammer
[23:18] J: is you
[23:18] J: you fucking tool


Death_Noodle is offline That Stupid Guy.

Death_Noodle's Avatar

Join Date: May 2004

Location: Sacramento

Posts: 774

Send a message via AIM to Death_Noodle Send a message via MSN to Death_Noodle Send a message via Yahoo to Death_Noodle

  #6 (permalink)  

Old 11-14-2004, 03:21 PM

When I finish this project (still need Sic's help on a few things =/), I'll be sure to post again I'm learning a lot...and very quick, so hopefully I won't need help. I was actually able to HELP someone with PHP yesterday
__________________
[:: CursedProphets :: BlizzCenter :: VDCore :: MeloDeath :: Battleforums ::]


Cold was my soul
Untold was the pain
I faced when you left me
A rose in the rain....
So I swore to the razor
That never, enchained
Would your dark nails of faith
Be pushed through my veins again

jd-inflames is offline VDC Team Member

Join Date: Feb 2004

Location: Kentucky

Posts: 245

Send a message via AIM to jd-inflames

  #7 (permalink)  

Old 01-10-2005, 07:29 PM

Ok, I've learned my basic syntax (for the most part...), I've learned how to print/insert/delete/modify table content from SQL tables, I'm about to figure out PHP logins.

This one should be rather simple. I don't really know how to word it...but I want to be able to make my content work together into modules so to speak. For instance, make my gallery.php or whatever if I'm playing with images, into index.php?go=gallery or something to that nature.
__________________
[:: CursedProphets :: BlizzCenter :: VDCore :: MeloDeath :: Battleforums ::]


Cold was my soul
Untold was the pain
I faced when you left me
A rose in the rain....
So I swore to the razor
That never, enchained
Would your dark nails of faith
Be pushed through my veins again

jd-inflames is offline VDC Team Member

Join Date: Feb 2004

Location: Kentucky

Posts: 245

Send a message via AIM to jd-inflames

  #8 (permalink)  

Old 01-10-2005, 08:47 PM

PHP Code:
if($_GET['do']== 'gallery') {
code for gallery
}else if($_GET['do']=='balh') {
code for balh

edit:

http://www.shiver7.com/tutorials/97/

heres another tut.

missionsix is offline loves you.

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,728

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #9 (permalink)  

Old 01-10-2005, 09:23 PM

Hey Sicloan, I don't know if it's because I'm using IE instead of FF (I'm at work) or if this PC is just really weird...but instead of viewing the code you are posting, I am reading "Unregistered visitors are not allowed to view any PHP code. Please register"

Nifty little trick to get people to register, but if it IS IE...
__________________
[:: CursedProphets :: BlizzCenter :: VDCore :: MeloDeath :: Battleforums ::]


Cold was my soul
Untold was the pain
I faced when you left me
A rose in the rain....
So I swore to the razor
That never, enchained
Would your dark nails of faith
Be pushed through my veins again

jd-inflames is offline VDC Team Member

Join Date: Feb 2004

Location: Kentucky

Posts: 245

Send a message via AIM to jd-inflames

  #10 (permalink)  

Old 01-10-2005, 09:24 PM

its not IE... and it happens for me too!!! i dunno wtf is up, it happened during the upgrade.

missionsix is offline loves you.

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,728

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #11 (permalink)  

Old 01-10-2005, 09:36 PM

Was it something you put in yourself?

-Edit-

Works fine on CP, and I just updated to 3.0.5 last night. Did you just replace the files or did you run the update script?
__________________
[:: CursedProphets :: BlizzCenter :: VDCore :: MeloDeath :: Battleforums ::]


Cold was my soul
Untold was the pain
I faced when you left me
A rose in the rain....
So I swore to the razor
That never, enchained
Would your dark nails of faith
Be pushed through my veins again

Last edited by jd-inflames : 01-10-2005 at 09:47 PM.

jd-inflames is offline VDC Team Member

Join Date: Feb 2004

Location: Kentucky

Posts: 245

Send a message via AIM to jd-inflames

  #12 (permalink)  

Old 01-11-2005, 02:04 PM

i think it was a mod i'lll have to look into it.

missionsix is offline loves you.

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,728

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #13 (permalink)  

Old 01-11-2005, 08:09 PM

Ok, I proudly made my first w3 validated page today, and this question is going to really kinda be for both serverside (for PHP) and for XHTML so if someone wants me to post a thread in there, just yell at me.

I want to make an e-mail form as well, with a form for the senders e-mail address, title, and messege. Now, PHP side, I'm not really too sure how to go about doing this. XHTML wise, how can I make this form and still be XHTML 1.0 compliant?
__________________
[:: CursedProphets :: BlizzCenter :: VDCore :: MeloDeath :: Battleforums ::]


Cold was my soul
Untold was the pain
I faced when you left me
A rose in the rain....
So I swore to the razor
That never, enchained
Would your dark nails of faith
Be pushed through my veins again

jd-inflames is offline VDC Team Member

Join Date: Feb 2004

Location: Kentucky

Posts: 245

Send a message via AIM to jd-inflames

  #14 (permalink)  

Old 01-11-2005, 10:20 PM

just make sure you follow xhtml rules. You can take a look at m6 source on my contact page. just make sure you close things and include the proper attributes. as for the php, look for the mail function, its really simple.

missionsix is offline loves you.

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,728

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #15 (permalink)  

Old 01-11-2005, 11:20 PM

Follow the XHTML rules...easy for you to say Up until today I didn't know that you couldn't use border="0" on image links I still haven't figured out how to properly make an image link in XHTML. Do you have to make another class in your CSS with the border properties off
__________________
[:: CursedProphets :: BlizzCenter :: VDCore :: MeloDeath :: Battleforums ::]


Cold was my soul
Untold was the pain
I faced when you left me
A rose in the rain....
So I swore to the razor
That never, enchained
Would your dark nails of faith
Be pushed through my veins again

jd-inflames is offline VDC Team Member

Join Date: Feb 2004

Location: Kentucky

Posts: 245

Send a message via AIM to jd-inflames

  #16 (permalink)  

Old 01-11-2005, 11:26 PM

you could do that, or:

<img src="blah.gif" style="border:0px;" />

you can add any css in the style attribute. And following xhtml rules, all <input />'s must be closed like i just wrote.

edit: and i'm an idiot, i accidently pressed edit instead of quote and typed in your box lol.

missionsix is offline loves you.

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,728

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #17 (permalink)  

Old 01-11-2005, 11:41 PM

Thanks? *teehee*

I'm probably going to be rummaging some PHP tutorial sites here soon. I'll probably be writing a lot of stuff this week and I'm not sure if I want to bug you the whole time

I'll be writing a lyrics submit, a tab submit, and an audio submit for my new site...I'ma be a busy guy. The hard part is probably going to be the organized layout and figuring out how I'm going to do it.
__________________
[:: CursedProphets :: BlizzCenter :: VDCore :: MeloDeath :: Battleforums ::]


Cold was my soul
Untold was the pain
I faced when you left me
A rose in the rain....
So I swore to the razor
That never, enchained
Would your dark nails of faith
Be pushed through my veins again

jd-inflames is offline VDC Team Member

Join Date: Feb 2004

Location: Kentucky

Posts: 245

Send a message via AIM to jd-inflames

  #18 (permalink)  

Old 01-13-2005, 04:07 PM

Ok, on my site I've got a template system going (and maybe later I will design a select system I actually think I might be able to do that on my own), I have an admin page (even though I am using cpanels login system because I don't feel like making a SQL table just for that), a contact form, and now, time for the good stuff

Like I said in the above post I'm wanting to create a script where it will display the information in my database. I want to create such depth that a user can click on the artist they want, then it will show the song title along with who submitted it and the date. Now, I know how to do this, I just need to figure out how to make an order for it. And let's say that there are 30 entries in my database of the same name, where it will group them together...I'm sure I could figure it out, but my brain wants to get stuck. I'm probably explaining it really stupid like, but surely you guys understand what I'm talking about. I also need to make a submit form as well, which I know how to do this as well, but I don't know how to do uploads yet (I can pick up the image upload tutorial from in here, it might have what I need).

Make any sense of what I need help with? All I really need to know (I HOPE) is how to make my display organize my database...not sure if that would be scripting or just html...I also need to know how to allow members to upload files and be able to restrict it to image formats and ptb formats.

Oh, and when I'm done with this project, I'll probably post a tutorial on designing a simple CMS
__________________
[:: CursedProphets :: BlizzCenter :: VDCore :: MeloDeath :: Battleforums ::]


Cold was my soul
Untold was the pain
I faced when you left me
A rose in the rain....
So I swore to the razor
That never, enchained
Would your dark nails of faith
Be pushed through my veins again

jd-inflames is offline VDC Team Member

Join Date: Feb 2004

Location: Kentucky

Posts: 245

Send a message via AIM to jd-inflames

  #19 (permalink)  

Old 01-13-2005, 04:17 PM

This is relatively easy.

You'll have a form for the song, that ask the user to include the info. Then when they click submit, it takes them to a page that has a script that gets that forms info and puts it in the right place. Fairly simple.

For a list of artists:

"select DISTINCT * from tablename"
Then use a while statement to loop through the results in php.

then when they click on a artist name

select * from tablename where artistname = "$_POST['artistname']


for the upload form, you will need to define an enctype on the <form> tag. then you can use the <input type="file" /> tag. Also, you will need to read how to retrieve that file in php, i really dont want to go into it, but its fairly straightforward. If your going to put those images / files into the database, your going to need to use fread() functions to get the contents of the file.

missionsix is offline loves you.

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,728

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #20 (permalink)  

Old 01-13-2005, 10:44 PM

Do you think it would be easier to organize if I just did it by hand instead of through a database? I think I understand what you are saying...but I still don't understand how I'm going to display it in a design aspect
__________________
[:: CursedProphets :: BlizzCenter :: VDCore :: MeloDeath :: Battleforums ::]


Cold was my soul
Untold was the pain
I faced when you left me
A rose in the rain....
So I swore to the razor
That never, enchained
Would your dark nails of faith
Be pushed through my veins again

jd-inflames is offline VDC Team Member

Join Date: Feb 2004

Location: Kentucky

Posts: 245

Send a message via AIM to jd-inflames

  #21 (permalink)  

Old 01-15-2005, 12:28 PM

There is php code out there that will read the ID tags from mp3s.

mind-spore is offline registered.

mind-spore's Avatar

Join Date: Dec 2004

Posts: 27

  #22 (permalink)  

Old 01-16-2005, 09:58 PM

I don't need it to read tags off of MP3's, I need to do something that will help me in organizing tables in a database
__________________
[:: CursedProphets :: BlizzCenter :: VDCore :: MeloDeath :: Battleforums ::]


Cold was my soul
Untold was the pain
I faced when you left me
A rose in the rain....
So I swore to the razor
That never, enchained
Would your dark nails of faith
Be pushed through my veins again

jd-inflames is offline VDC Team Member

Join Date: Feb 2004

Location: Kentucky

Posts: 245

Send a message via AIM to jd-inflames

  #23 (permalink)  

Old 01-17-2005, 01:43 PM

k, was just letting you know that can be done ;-)

mind-spore is offline registered.

mind-spore's Avatar

Join Date: Dec 2004

Posts: 27

  #24 (permalink)  

Old 01-17-2005, 08:55 PM

Oh, I know Sicloan has showed me in ASP as well.
__________________
[:: CursedProphets :: BlizzCenter :: VDCore :: MeloDeath :: Battleforums ::]


Cold was my soul
Untold was the pain
I faced when you left me
A rose in the rain....
So I swore to the razor
That never, enchained
Would your dark nails of faith
Be pushed through my veins again

jd-inflames is offline VDC Team Member

Join Date: Feb 2004

Location: Kentucky

Posts: 245

Send a message via AIM to jd-inflames

  #25 (permalink)  

Old 01-18-2005, 09:19 AM

btw...

http://validator.w3.org/check?uri=ht...lodeath.com%2F

This page is not Valid XHTML 1.0 Strict!

mind-spore is offline registered.

mind-spore's Avatar

Join Date: Dec 2004

Posts: 27

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
El Diablo de Lag! The Anti-Bob The VOID! 5 05-01-2006 09:42 PM
Request Thread Jay Digital Art Showcase 47 12-19-2005 07:59 AM
Tutorial Request, by me. FishDynasty Request Content 21 04-01-2005 08:33 PM
Tutorial Request - Tweak prolly Phalanx Request Content 6 09-02-2004 08:18 AM
SpinEffect Tutorial Fluffy_monkey User Submitted Tutorials 1 06-03-2004 04:59 PM


All times are GMT -7. The time now is 03:45 AM.