Jump to content

Snooble

Members
  • Posts

    311
  • Joined

  • Last visited

    Never

Everything posted by Snooble

  1. you'd start off with a mysql database. Containing a table with the items in it. Then echo them out of an array onto the users page (on loop until no more exist). When the user enters an amount have the price drop or raise by a certain percentage. Or however complicated you wish the mathmatics to be. Then when the user buys the item have it removed from the table and entered into their session variables? (possibly another table). I'd start with a simple design, slowly add a cash/points system and then create the items etc. I've never used neopets before or made a cash/points/sales system. This is just a guesstimation. Take it and re-post when you are stuck. If you do not know php at all, it's quite ambitious. Read up. w3schools.com Snooble
  2. thank you, i'll change title to date and then it'll show the last uploaded thank you... will post again when i have the table and that running... So far i have www.wezzsmusic.ifastnet.com/WM/music.php i want it to add cells to the table printing the song title etc in each cell... I just need an example for a loop that will pull the information from the mysql table and into the seperate cells (creating a new one)... Snooble
  3. thorpe = genius I suggest Perl... as there is a demand for perl at this moment in time. C++ is another alternative. Snooble
  4. thank you. never EVER passed information through the URL so it's worth a shot for me. Thank you i understand that code. htmlentities will do wont it? Snooble
  5. search LAMP on google. Linux Apache Mysql Php (Python or Perl) I believe.. Snooble
  6. yes that's why i dont escape quotes unless i have to... @runnerjp placing \ infront of your " is called (escaping) it means that your echo command doesn't end prematurely. echo "i'm echoing a link <a href="oopsimessedup.bad">the echo has ended already so this isn't seen</a>" echo "i'm echoing a link <a href='usingsinglequotes.good'>as the echo hasn't finished this will all be a link to the page</a>" Hope that makes it a little clearer, i'm new to this too... I suggest... STUDY STUDY STUDY! Snooble
  7. ok, what would i link to... for example table looks like: Song Title | Size | Date Added | Download Link ---------------------------------------------------------- I'm an elephant| 2.3mb | 20.2.07 | Download When i click song title it orders in alphabetical... so... Order by (name of field) Got it, but how do i link to that command? 2 ways i think of, one... linking to a different .php file with the sql in it. two. sql injection... SELECT * FROM (tablename) ORDER BY (fieldname)... Best way? Snooble (Thank you)
  8. <?php if($auth[displayname] == "") { echo "Welcome <font size='3' face='Times'> <b>Guest</b> please <a href='register.php'>Register</a>"; } else { echo "you are logged in as ".$auth[displayname]; } ?> That works. Now post the source of /include/header.inc.php Snooble
  9. Hello people, Just a quick one (Hopefully)... I want to have a list of songs to appear on a page in which the user can order them by: Last added Alphabetically(A-Z) Size Do i use MySQL? I know how to print results from mysql but i'd need help with creating a loop that printed the results until there were none left, also, while printing i need them to be put into a table. But the main objective is to learn how to sort the information on the users page. Thanks Snooble
  10. might be better for you to use the switch statement also... Just a tip. Snooble
  11. no it's not working. It loads the page even if i'm not logged in. I ....... lol.. I just placed it before the <head> and <html> tags lol... Apologies for this waste of time. It works. Should have trusted myself in the first place, it's only too easy to ask for help. Snooble Cheers
  12. They are added to stop you ending your current function etc. echo "i am an echo if i wanted to type a quote or select information inside this speech i could use 'apostrophes' or /"magic quotes/" It basically tells the php to ignore the speech marks coming up.
  13. Hey people: <?php if(!isset($_SESSION['myemail'])){ header("Location: login.php"); } ?> Is that where i place the !? I want to check if the session IS NOT set. If it's NOT SET then header to login.php. If IT IS SET then carry on loading the page. Thanks Snooble
  14. i suggest you dont create a shop like this. It will be rediculous. Obviously you can do what you think but come on. Itunes... And even that is for the "computer illiterate" because *cough*Lime*cough*wire*cough*. Do you have audio experience? Have you checked out competition. Anyway. Like simco said. Upload via FTP and store the link to the song in a database. (Your database better be secure or somepeople may inject a little SQL and pull out a few hundred Direct Download songs) Anywho. Enjoy the project, Good luck Snoobs
  15. lol. Yes you were right, i needed to echo the command, apologies. Thanks for your help!
  16. it's simply. 1234567890123456 for a credit card. I need to be able to show it as: ************3456 I'm storing the card number as: $list['CCNO'] and my current code which returns nothing is: substr_replace($list['CCNO'], "*", 0, strlen($list['CCNO']) - ; The page loads and everything but i get a blank space in place of the ccno. Thanks Hugs you genius lol, Snoobs
  17. MAKE SURE it is connected if you are still recieving the error. Snooble
  18. i dont get anything outputted to the browser?!? Do i need to echo something special? Thanks, Snooble
  19. your right. duh. god. Thanks
  20. Ok. Im trying to set variables on page 1. Post them in hidden fields to page 2 which then lets me use them on page 3. Page 1 is: <form action="checkpurchase.php" method="post"> <input type="hidden" name="product" value="$product"><?php $price = £59.99; $product = Apple Ipod; ?> <input type="hidden" name="price" value="$price"> <input type="hidden" name="product" value="$product"> <input name="quantity" type="text" value="1" size="2" maxlength="2" /> <input type="submit" name="submit" value="Buy" /> Page 2 is: <?php include 'sessionstartandsql.php'; include 'expire.php'; $_SESSION['price'] = $_POST['price']; $_SESSION['product'] = $_POST['product']; $_SESSION['quantity'] = $_POST['quantity']; if(isset($_SESSION['myemail'])){ header("Location:purchase.php"); } else{ header("Location:login.php"); } ?> I just need code to echo out the variable on page 3. So my goal: Assign "£59.99" and "Apple Ipod" to seperate variables that i can echo out on page 3. Snooble
  21. i send it to a php page via POST looking like this: <?php include 'sessionstartandsql.php'; include 'expire.php'; $_SESSION['price'] = $_POST['price']; $_SESSION['product'] = $_POST['product']; $_SESSION['quantity'] = $_POST['quantity']; if(isset($_SESSION['myemail'])){ header("Location:purchase.php"); } else{ header("Location:login.php"); } ?>
  22. <?php $price = "£59.99"; $product = "Apple Ipod"; ?> <input type="hidden" name="product" value="$product"> how can i carry variables through a posted form? Like that? Snooble
  23. I have the user's phone number in a database i know how to echo the phone number to the user but i want to replace the first "however many" digits with *'s. Like they do with credit cards etc. Anyone know? Snooble
  24. thank you very much. First suggestion worked. But second suggestion will help in the future. Thank you Snooble
  25. <?php include 'sessionstartandsql.php'; if(isset($_SESSION['myemail'])){ header(Location:purchase.php); } else{ header(Location:login.php); } ?> i get a blank page. What's wrong? Snooble
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.