Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. Now, i assume thats a form, when you submit that data, (submit to the same page) update that users recoard <?php if(isset($_POST['submit'])) { //update record $SQL = "update users SET realname = '{$_POST['user_name']}' WHERE user_id='{$_SESSION['user_id']}' "; } // display form ?> NOTE: this isn't perfect but a start
  2. try SELECT email FROM users GROUP BY email HAVING ( COUNT(email) = 1 )
  3. check the sessions are NOT stored in a tmp folder that is accessible via a shared folder.
  4. No it won't, it will just process the script directly via php and then return the results to the webserver, anyways good luck with your search MadTechie Out!
  5. this should work SELECT $query = "SELECT * FROM users WHERE user_id='{$_SESSION['user_id']}'"; of course your need the fetch ect see your section
  6. if all is fine please click resolved
  7. try $result1 = mysql_query("SELECT * FROM bulletins WHERE driverID = '$friend_id' ORDER BY 'bulletinID' DESC LIMIT 0, 5") or die(mysql_error());
  8. post YOUR code and explain the problem
  9. you have <?php twice (without closing the first one) remove the 2nd <?php
  10. MadTechie

    Doubt

    whats the problem or try the same post here
  11. can you please click solved
  12. can you post what you have so far, so we see what you have (fields etc) you next step is display info in a form, then on submit update the currectly displayed record
  13. look for a Pagination, it will be simpler.. as for adding a link <a href="myscript.php?page=($page+1)">Next Page</a>
  14. try <?php $go_on = "yes"; // If $check_num_rows equals 0 then it should $go_on should say no, thus, stopping the loop while($go_on == "yes") { // Pull all candidates from DB $sql = "SELECT * FROM pandoris_hotornot_options WHERE gender = '$gender'"; $run = mysql_query($sql); $numrow = mysql_num_rows($run); // Put all the results in an array for ($i=0; $i <$numrow; $i++) { $row=mysql_fetch_array($run); $ids[$i]=$row['user_id']; $names[$i]=$row['user_name']; $path[$i]=$row['path']; $comments[$i]=$row['comments']; } // Randomly pick a number $number=rand (0, ($numrow-1)); // Check another DB which stores candidates id's and the rater id's. $checksql = "SELECT * FROM pandoris_hotornot_ratings WHERE canidate_id = '$number' AND rater_id = '$user_id'"; $checkrun = mysql_query($checksql); $check_num_rows = mysql_num_rows($checkrun); // If it comes back 0 that means they haven't voted on that person yet. if($check_num_rows == "0") { $go_on = "no"; } else { $go_on = "yes"; } } ?>
  15. it would be a combo of html & code,
  16. it was just an example <?php //get a list of the info from the table to make the linkies $page = (isset($_GET['page']))?$_GET['page']:1; // page number $X = ($page - 1); $Y = (5 * $page); $sql = "select * from news ORDER BY id desc Limit $X,$Y "; $result = mysql_query($sql, $conn) or die(mysql_error()); ?> would probably be better, i assume your calling the page like so myscript.php?page=1
  17. Check you have all your closing } ie this will fail <?php function test() { for($n=1;$n<10;$n++) { } ?>
  18. erm.. this is either a freelance question or a html question but hardly a problem!
  19. try $renamed_photo = $random_number.$username.$_FILES["image1"]["name"]; to $renamed_photo = random_number.substr($_FILES["image1"]["name"],strlen($_FILES["image1"]["name"])-3,3);
  20. code seams fine
  21. on the page you go to, add a hidden field with the same name and set the default text to the id,
  22. Use Limit X,Y <?php $page = $_GET['page']; // page number $X = ($page - 1); $Y = (10 * $page); $sql = "select * from news ORDER BY id desc Limit $X,$Y "; ?>
  23. if you want to display the parsed data then just use include("/Select2a.php"); i have no idea why your trying this as the performance increase would be less than the extra memory used! the problem is your path is incorrect. fix that and all will be ok
  24. Humm, it all depends on the page height/width 10 para might not cut it, have a look at some of the User Contributed Notes on the [urlhttp://uk.php.net/wordwrap]wordwrap[/url] page
  25. erm.. use fwrite
×
×
  • 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.