Jump to content

Jewbilee

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Everything posted by Jewbilee

  1. could you use OOP to make a class with all of the basic information?
  2. ive always assumed it was more of finding the mouse's coordinates on the picture, storing them in a database, and then generating an image map using the stored coords... i could be wrong though.
  3. edit: didnt see your problem at the top, my bad. in that case; do what the other person suggested, but once you've verified whether or not the checkbox is set, add it to an array $labels[] from the for loop.
  4. yea, if you want to pass it as an array, use my method, when you pull it from $_POST, it already is one.
  5. or: <input type="checkbox" name="labels[]" value="struts">BLAH $labels = $_POST['labels']; foreach($labels as $key => $value) { //do stuff } use the name labels[] from each one, theyll all be stored in the array.
  6. write your own custom function to use the substring() function to filter out words within a given tag. findWord(tag);. And you would have it look for the start tag, the end tag, and return the stuff in the middle.
  7. you're also using a $ in the HTML form for the name... you only need to use the letter or string for the name.
  8. it made total sense to me just by reading the topic.. he wants to know: how does www.myspace.com/username forward to the proper url or something like... myspace.com/viewprofile.php?username=username. I've gotten it working before, but I cant remember so someone else will have to help
  9. if you know the number month, the number day, and the number year: echo date("l", mktime(0, 0, 0, $month, $day, year));
  10. you would need to echo both the HTML and PHP... make sure that when you echo the HTML, that you've properly formatted it by escaping the quotes and everything. I've never done it myself, but i dont see why it wouldn't work.
  11. without a database of some sort, there is no way to efficiently save what is entered.
  12. Skunk, that isnt what hes asking. Hodo, what you're trying to use is $_GET functions. When you have a url such as: http://www.myspace.com/myfile.php?userid=10 it is possible to retrieve "userid"'s value using a the $_GET function. in the myfile.php code, you would have something like this: $userid = $_GET['userid']; That takes the value for userid from the url and assigns it to a new variable. (Note: the variable names can be whatever you want). You would then use this to load whatever info you want.
  13. Error in query: SELECT * FROM rentalsgal. You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'query1' at line 1
  14. I have a code that for some reason is not working. I've printed out the sql error and it just says there's an error... nothing specific. The problem is with $query1. Its saying theres an error but ive run the query in PHPMyAdmin and it works fine. Any suggestions? <?php include("layout_1.txt"); include("connect.php"); $id = $_GET['id']; if(!empty($id)) { $query = "SELECT * FROM camprentals WHERE id=$id"; $result = mysql_query($query) or die ("Error in query: $query. ".mysql_error()); $query1 = "SELECT * FROM rentalsgal"; $result1 = mysql_query(query1) or die ("Error in query: $query1. ".mysql_error()); while($row = mysql_fetch_object($result)) { echo "<center><font size=5>$row->title</font><br><br>"; $imgs = explode(" ", $row->imgs); echo "<table border=0 cellspacing=10>"; $count = 1; foreach($imgs as $value) { $found = false; while($row1 = mysql_fetch_object($result1)) { if($value == $row1->name) { $found = true; } } if($found){ if($count == 1) { echo "<tr><td>"; } else { echo "<td>"; } echo "<a href=\"gallery/rentals/".$value.".jpg\"><img src=\"gallery/rentals/".$value."_thumb.jpg\" border=0></a>"; if($count == 5) { echo "</td></tr>"; } else { echo "</td>"; } $count++; } } echo "</table>"; echo $row->desc; } } else { $query = "SELECT * FROM camprentals"; $result = mysql_query($query) or die ("Error in query: $query. ".mysql_error()); echo "<table border=0>"; while($row = mysql_fetch_object($result)) { $desc = substr($row->desc, 0, 150); echo "<tr><td width=\"110\"><img src=\"gallery/rentals/".$row->mainimg."_thumb.jpg\"></td> <td><font size=5><a href=\"rentals.php?id=$row->id\">$row->title</a> </font><br>".$desc."...</td></tr>"; } echo "</table>"; } include("layout_2.txt"); ?>
  15. hmm.. ill give it a try a little later..
  16. im a little confused how that query works..
  17. it's integrated via an include
  18. heres the problem with the above parts.. since one field is named user_id and the other is friend.. what if i wanted to display friend's friends and not user_id's... like.. say: bob & fred bod & burt burt & fred.. you see?  How would i display all of burts friends?
  19. CuteNews.. simple flat file databse easy install..
  20. Im having a little trouble with this.  I need a way to keep track of friends of users similar to myspace.  One user can add several others to a friends list and be viewed and removed and what not.  The only problem Im having is how to do I store this in a database?  Should I make a seperate table or store the id's of friends in a users table?
  21. and what you said did help, thanks very much.. just waiting for register_globals answer now
  22. dont i need register globals on in order to user $_GET and $_POST and stuff?
  23. Every time i try to submit the following code.. i get a 403 error..  I turned register_globals on but I can't figure out whats wrong.. [code]<?php if (!isset($_POST['submit'])) { // form not submitted ?> <form action="<?=$_SERVER['PHP_SELF']?>" method="post"> <input type="submit" name="submit" value="Test"></form> <?php } else { include('testdb.php'); } ?>[/code] i get this error: Forbidden You don't have permission to access /< on this server.
  24. i still need help with mod_rewrite.. ive found tutorials online but im not getting it..
  25. is this what you mean? http://forums.searchenginewatch.com/showthread.php?t=3925
×
×
  • 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.