Jump to content

Jewbilee

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Jewbilee's Achievements

Newbie

Newbie (1/5)

0

Reputation

  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..
×
×
  • 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.