Help with PHP coding?
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 23

Thread: Help with PHP coding?

  1. #1
    Registered User BurnFEST's Avatar
    Join Date
    Feb 2001
    Location
    Adelaide, South Australia
    Posts
    603

    Post Help with PHP coding?

    Not sure whether to ask this here or in Website Design...but its related to programming sao i decided to post here...

    I'm currently working on a new Windrivers Photo ID page, with a database backend so people can add/modify their own entries, instead of emailing them to me.

    I'm currently just starting to learn PHP using online tutorials and have started creating the page.

    Anyone here know PHP and is willing to help me out?

    Thanks very much in advance...

    Burn.

  2. #2
    Registered User +Daemon+'s Avatar
    Join Date
    Jan 2002
    Location
    RC, Ca
    Posts
    3,406

    Post

    I can give a hand what's the plan?

    Did you want a mysql backend with php?

  3. #3
    Registered User BurnFEST's Avatar
    Join Date
    Feb 2001
    Location
    Adelaide, South Australia
    Posts
    603

    Post

    Yeah. MySQL backend + PHP.

    Mostly im sticking to doing really simple stuff because it will work, and because the only knowledge i have is that from a couple of simple tutorials...

    The only way i can show what i want to do is by letting you view my page, which can only happen when im online (im coding on my computer, and im on dialup).

    Do you have ICQ or MSN etc so i can chat with you realtime?

    Thanks,

    Burn.

  4. #4
    Registered User +Daemon+'s Avatar
    Join Date
    Jan 2002
    Location
    RC, Ca
    Posts
    3,406

    Post

    [quote]Originally posted by BurnFEST:
    <strong>Yeah. MySQL backend + PHP.

    Mostly im sticking to doing really simple stuff because it will work, and because the only knowledge i have is that from a couple of simple tutorials...

    The only way i can show what i want to do is by letting you view my page, which can only happen when im online (im coding on my computer, and im on dialup).

    Do you have ICQ or MSN etc so i can chat with you realtime?

    Thanks,

    Burn.</strong><hr></blockquote>


    Well when Im ou home on im AIM as xDigitalExpl0itx

    But the best thing is to email me. Message me if you want it.

    There are alot of great php books out on the market you may want to look at or even buy.

  5. #5
    Registered User BurnFEST's Avatar
    Join Date
    Feb 2001
    Location
    Adelaide, South Australia
    Posts
    603

    Post

    Ok, ill add you

    Ive also got a temporary dialup server up so you can see what im trying to do.

    <a href="http://festy.ath.cx/windrivers/photomain.php" target="_blank">http://festy.ath.cx/windrivers/photomain.php</a>

    Its just the news page, practise for the rest of the site...ive managed to make an add/edit/delete, but my problem is they are listed on the page from oldest to newest, and i want them listed with the newest at the top.

    You can download my php/html <a href="http://members.dingoblue.net.au/~dburney/htmstore/php.zip" target="_blank">HERE</a>
    And I've made a MySQL database dump with you can get <a href="http://members.dingoblue.net.au/~dburney/htmstore/photo.dump" target="_blank">HERE</a>

    I am going to go to the library and look for books, but i doubt there'll be any useful ones. I'd really rather human help, because that way i can get explainations and stuff

    The idea is to make it look like the <a href="http://windriversfriends.cjb.net" target="_blank">Windrivers Photo ID Database</a> page ive been running for about a year, except instead of people emailing me for additions/changes they can do it themselves. I know enough to do all of it, theres just a few things that are bugging me, like how to display the news in reverse order

    Thanks

    Sam.

  6. #6
    Registered User +Daemon+'s Avatar
    Join Date
    Jan 2002
    Location
    RC, Ca
    Posts
    3,406

    Post

    Ok, Im looking at the source code.

    You shuld run all this off mysql, this wouldnt be hard I can show you some examples but let me look through all the pages first.

  7. #7
    Registered User +Daemon+'s Avatar
    Join Date
    Jan 2002
    Location
    RC, Ca
    Posts
    3,406

    Post

    OK Ive did a example page for you.

    to veiw the page running go here
    <a href="http://www.daemonprojects.com/windrivers/a.php" target="_blank">http://www.daemonprojects.com/windrivers/a.php</a>

    to download the src code go here
    <a href="http://www.daemonprojects.com/windrivers/windrivers.zip" target="_blank">http://www.daemonprojects.com/windrivers/windrivers.zip</a>

    to see the mysql setup go here (this is with the code also)
    <a href="http://www.daemonprojects.com/windrivers/mysqlsetup.JPG" target="_blank">http://www.daemonprojects.com/windrivers/mysqlsetup.JPG</a>

    To configure the mysql connection script
    open the databseconfig.php file and edit the file
    just need the username/password and database name

  8. #8
    Registered User +Daemon+'s Avatar
    Join Date
    Jan 2002
    Location
    RC, Ca
    Posts
    3,406

    Post

    heres a fix for a.php

    where the $sql = statement is replace it with this

    $sql = "select * from photo where Pusername like 'A%' order by Pusername";

    this will sort it so any user with the username that starts with A will show up on the a.php page

    to change it just change it here it says 'A%' to 'D%' or whatver for the rest of the pages


    a little demo
    <a href="http://www.daemonprojects.com/windrivers/noindex.html" target="_blank">http://www.daemonprojects.com/windrivers/noindex.html</a>

  9. #9
    Registered User
    Join Date
    Jun 2001
    Location
    LocalHost
    Posts
    762

    Post

    [quote]Originally posted by Daemon:
    <strong>heres a fix for a.php

    where the $sql = statement is replace it with this

    $sql = "select * from photo where Pusername like 'A%' order by Pusername";

    this will sort it so any user with the username that starts with A will show up on the a.php page

    to change it just change it here it says 'A%' to 'D%' or whatver for the rest of the pages


    a little demo
    <a href="http://www.daemonprojects.com/windrivers/noindex.html" target="_blank">http://www.daemonprojects.com/windrivers/noindex.html</a></strong><hr></blockquote>


    Fix:
    <a href="http://www.daemonprojects.com/windrivers/noindex.php" target="_blank">http://www.daemonprojects.com/windrivers/noindex.php</a>
    http://www.amd.com/us-en/assets/cont...uts/athlon.gif

    Do you leak any fluids, do you have any bumps on your rear, do you have any unpleasant odors?
    If you answered yes to any of these then you are not qualified to own a new AMD ATHLON XP.
    If someone ask you if you are running the all-new fastest AMD ATHLON XP, just turn around and reply "WHY YES, AND ITS CERTIFIED"

    http://www.daemonprojects.com/

  10. #10
    Registered User BurnFEST's Avatar
    Join Date
    Feb 2001
    Location
    Adelaide, South Australia
    Posts
    603

    Post

    Thanks for your work

    What youve done with the photo pages is pretty much exactly how i wanted to do it

    i still dunno how to do the news in reverse order on photomain.php and also how do let people upload images straight into the database?

    Waiting your reply,

    Burn.

  11. #11
    Registered User
    Join Date
    Jun 2001
    Location
    LocalHost
    Posts
    762

    Post

    there is a way if you use blob. this will allow you to upload images into mysql. Ill see what I can do.

    heres an update on the code for you. Look through it have any question feel free to ask.

    <a href="http://www.daemonprojects.com/windrivers/windrivers.zip" target="_blank">http://www.daemonprojects.com/windrivers/windrivers.zip</a>

    Ok Im using 2 database tables ones for the iamges other is for the news.

    photo and main

    heres how I configured my tables

    <a href=http://daemonprojects.com/windrivers/photo.JPG>photo</a>
    <a href=http://daemonprojects.com/windrivers/main.JPG>main</a>

    im useing phpMyAdmin 2.2.4
    if you are not already using this you should makes things alot eaiser.
    http://www.amd.com/us-en/assets/cont...uts/athlon.gif

    Do you leak any fluids, do you have any bumps on your rear, do you have any unpleasant odors?
    If you answered yes to any of these then you are not qualified to own a new AMD ATHLON XP.
    If someone ask you if you are running the all-new fastest AMD ATHLON XP, just turn around and reply "WHY YES, AND ITS CERTIFIED"

    http://www.daemonprojects.com/

  12. #12
    Registered User
    Join Date
    Jun 2001
    Location
    LocalHost
    Posts
    762

    Post

    as good as inserting images into the database, this can casue the images to corrupt it better off if you have the users either one give the url or two have them upload it to a directory.

    I recomend you have the users put the url in.

    here is the insert page if you want to play around with the data

    <a href="http://daemonprojects.com/windrivers/insert.php" target="_blank">http://daemonprojects.com/windrivers/insert.php</a>
    http://www.amd.com/us-en/assets/cont...uts/athlon.gif

    Do you leak any fluids, do you have any bumps on your rear, do you have any unpleasant odors?
    If you answered yes to any of these then you are not qualified to own a new AMD ATHLON XP.
    If someone ask you if you are running the all-new fastest AMD ATHLON XP, just turn around and reply "WHY YES, AND ITS CERTIFIED"

    http://www.daemonprojects.com/

  13. #13
    Registered User BurnFEST's Avatar
    Join Date
    Feb 2001
    Location
    Adelaide, South Australia
    Posts
    603

    Post

    Ok, is there any easy way to let users upload the images to my server via PHP?

    I was going to use the 'type url to image' method but a lot of people's webspace wont let other websites link to their images...so uploading to my server will be a LOT easier.

    It's past midnite here, so im going to bed - ill look at that code tomorrow.

    Thanks again heaps for your help!

    Burn.

  14. #14
    Registered User
    Join Date
    Jun 2001
    Location
    LocalHost
    Posts
    762

    Post

    well you may want to check <a href="http://www.planet-source-code.com" target="_blank">www.planet-source-code.com</a>

    <a href="http://www.hotscripts.com" target="_blank">www.hotscripts.com</a>

    I have a little script I found dont know if it works but it may give an Idea.

    <a href="http://www.daemonprojects.com/windrivers/upload.zip" target="_blank">http://www.daemonprojects.com/windrivers/upload.zip</a>
    http://www.amd.com/us-en/assets/cont...uts/athlon.gif

    Do you leak any fluids, do you have any bumps on your rear, do you have any unpleasant odors?
    If you answered yes to any of these then you are not qualified to own a new AMD ATHLON XP.
    If someone ask you if you are running the all-new fastest AMD ATHLON XP, just turn around and reply "WHY YES, AND ITS CERTIFIED"

    http://www.daemonprojects.com/

  15. #15
    Registered User BurnFEST's Avatar
    Join Date
    Feb 2001
    Location
    Adelaide, South Australia
    Posts
    603

    Post

    I've had a look at your website...i take it your news is all php...and in order from newest to oldest...my only real problem right now is that...how do you do it?

    Burn.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •