Jump to content

litebearer

Members
  • Posts

    2,356
  • Joined

  • Last visited

Everything posted by litebearer

  1. Strange, the demo works fine. Please show us your code.
  2. since you are UPDATING the record, why not populate the form with the existing data? That way data that has been modified will update the appropriate fields; while data unchanged will simply be populated with its original content. BTW just because the user is registered and editing their own data does NOT mean you should skip validating and sanitizing the data.
  3. Perhaps let the "REGISTERED" users upload the pics via form. db table id, image_name, user_id, approved. set approved to 0 for NOT approved yet. When user uploads pic, move to folder, add to db, send email to Admin that image has been uploaded. THEN when Admin reviews the unapproved images she/he can either delete the image or change approved to 1. When displaying the pics, set filter to only show pics where approved = 1.
  4. Thank you! That is/was the problem. I had always presumed that file() returned an array using the newline as the delimiter (and did NOT include the newline as part of the array elements). Thank you again!!!
  5. I can't seem to understand why in_array is NOT finding the 'needle'. php file: <?PHP $search = "WS11"; $valid_codes = file("outcode2.txt"); if(in_array($search, $valid_codes)){ echo "yes"; }else{ echo "No"; } echo $search . "<hr>"; echo "<PRE>"; print_r($valid_codes); echo "</pre>"; ?> outcode2.txt: WS10 WS11 WS12 WS13 WS14 WS15 WS11 is in the outcode2.txt It is not an issue of case. Perhaps my old eyes just keep missing the problem. Any help is appreciated.
  6. There are times when one must blend/merge/use php within htlm output. it is not a question of separating logic FROM html. what if your options were numbers rather than html code? (rhetorical) Your function is a logical function. Consider when one is echoing a result set from a query - is that logic or presentation? (also rhetorical)
  7. Also, try this... replace this: $qry = $sql->sqlStart.$sql->stmt.'Group By property.id'; with this... $qry = $sql->sqlStart.$sql->stmt.'Group By property.id'; echo $qry; exit(); and tell us the results
  8. for the moment, replace this echo "<a href=\"{$row['url']}\"><img class='image1' src=\"{$row['image_path']}\" alt=\"{$row['summary']}\"> </a> <br />"; with this... ?> <a href="<?php echo $row['url']; ?>"><img src="<?php echo $row['image_path']; ?>" alt=""></a><hr> <?php
  9. @Thorpe = always with the common sense - sheesh! What fun is that?
  10. I flipped the closing tag <?php /* put your database connection here */ $query = "SELECT * FROM images"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { ?> <a href="<?php echo $row['url']; ?>"><img src="<?php echo $row['image_path']; ?>" alt=""></a><hr> <?php } ?>
  11. Save this as test.php (make sure to include your database connection) then point your browser to it <?php /* put your database connection here */ $query = "SELECT * FROM images"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { <? <a href="<?php echo $row['url']; ?>"><img src="<?php echo $row['image_path']; ?>" alt=""></a><hr> <?php } ?>
  12. look at the browser source code and see what it has as the link destination. post that here
  13. try changing this... $sql = "INSERT INTO girl (`girl`,`accepted`,`ip`,`sex`) VALUES ('$name', '0', '$ip', 'Female');"; to this... $sql = "INSERT INTO girl (`girl`,`accepted`,`ip`,`sex`) VALUES ('$name', '0', '$ip', 'Female')";
  14. @jesirose see post 5 second script - using back tics on the variables
  15. no, it will be where you want to display the images so the user can make their choice
  16. A) in your query, REMOVE the first semi-colon B) use back tics for your field names and single quotes for your variables test it and tell us what happens
  17. if each link has the unique property id corresponding to the image, then yes.
  18. immediately after this... $sql = "INSERT INTO girl (`girl`,`accepted`,`ip`,`sex`) VALUES (`$name`, `0`, `$ip`, `Female`);"; add this... echo $sql; exit(); and tell us what you see
  19. echo "<a href='view.php?id=" . $row['id'] . "><img class='image1' src='{$row['image_path']}' alt='{$row['summary']}'></a> <br />"; view.php <?php GET the id connect to db query db for that paticular id display the results ?>
  20. follow this similar thread http://www.phpfreaks.com/forums/index.php?topic=358846.0
  21. Rough overview... 1. make each link to view.php passing property id via url 2. make view.php page that: A) $_GET the id being passed; B) queries the db for that particular id; C) Displays the query results
  22. find this in the script... .box_gallery { text-align:center; position:absolute; top:0; right:0; z-index:1000; overflow:auto; } and change top:o; to top:whatever height of banner is plus 10 pxs
  23. IMHO from perusing the script, you will need to make adjustment(s) to the formatting class(es) the script uses, allowing for a div above the image content (which div will contain your banner). This is beyond my capabilites. I would suggest posting this in the CSS section of phpfreaks
×
×
  • 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.