Jump to content

pocobueno1388

Members
  • Posts

    3,369
  • Joined

  • Last visited

    Never

Everything posted by pocobueno1388

  1. <h1>Welcome To My Page About <?php if(!empty($_GET['ins'])) echo urldecode($_GET['ins']); else echo "Something"; ?>
  2. The code works fine for me. Make sure there are no trailering spaces after the FORM; line.
  3. You never define the $row variable. change your code to this <?php $resultghg="SELECT * FROM `users` WHERE ID = '$quser'"; $articlesghg = mysql_query($resultghg) or die(mysql_error()); $numbghg = mysql_num_rows($articlesghg); $row = mysql_fetch_assoc($articlesghg); //added this line ?>
  4. I think thats the only one he has come out with =/
  5. http://www.killerphp.com/articles/introduction-to-mysql-video-tutorial/
  6. Change require "connect.php"' To require "connect.php";
  7. Why do you need a while loop? Explain a little more what you have to do to make it work.
  8. Try <?php include 'header.php'; include 'cont.php'; $sql = mysql_query("SELECT * FROM scores"); while ($row = mysql_fetch_assoc($sql)) { $hscore = $row['homescore']; $ascore = $row['awayscore']; $home = $row['home']; $away = $row['away']; $timestamp = $row['timestamp']; $round = $row['roundname']; if ($hscore >= $ascore) { $winner = $home; } if ($ascore >= $hscore) { $winner = $away; } echo $winner.'<br>'; } ?>
  9. There are good PHP/MySQL tutorials at these sites: www.tizag.com www.w3schools.com All you need to do is select the information from the database, here is an example snippet. <?php $query = mysql_query("SELECT title, start_date, end_date FROM table WHERE {condition}")or die(mysql_error()); $row = mysql_fetch_assoc($query); echo "<b>Title of Event</b>: {$row['title']}<br>"; echo "<b>Registration Start Date</b>: {$row['start_date']}<br>"; echo "<b>Registration End Date</b>: {$row['end_date']}<br>"; ?>
  10. <?php $password_arr = array('password1','password2'); if (isset($_POST["password"]) && (in_array($password, $password_arr))){ //They supplied a good password } else { //wrong password } ?>
  11. Can you show us the rest of the script? Chances are we are going to have to edit the part of the script that checks if they entered a correct password so it can work with the password array.
  12. Use sessions, that way you can maintain the information through to the last page. It would be a lot easier than trying to pass every value from every page through hidden inputs. Give an example of your form (code)...it's hard to tell what your trying to do by your vague description.
  13. Search Google, there are plenty of results: http://www.phpeasystep.com/workshopview.php?id=2 http://www.plus2net.com/php_tutorial/php_multi_file_upload.php http://www.codewalkers.com/c/a/File-Manipulation-Code/Multiple-File-Upload/ I Googled "PHP multiple upload script".
  14. It might be that the date in your table isn't in proper format. Your date: 2008-1-15 Should be: 2008-01-15 That may not be it, but MySQL is pretty picky when it comes to dates.
  15. Here are two good tutorial sites www.tizag.com www.w3schools.com
  16. Your trying to echo inside an echo. Change this echo "<a href='requests_edit.php?id=<? echo \"$id\"; ?>'>edit</a></TD>"; To echo "<a href='requests_edit.php?id=$id'>edit</a></TD>";
  17. Change it to $sql = "SELECT * FROM birthdays WHERE Contact_Info_FirstName LIKE '%$string%' or Contact_Info_LastName LIKE '%$string%' or Contact_Info_State LIKE '%$string%' ORDER BY id DESC";
  18. You can't change the content of anyone else's page. Unless you mean you want to actually grab the source code from another website and change the content on your own site. Your description for what you want is pretty vague, so this may be something that can be easily done and already written, or it could be something pretty unique where you would have to write the code yourself/hire someone to do it.
  19. Love it. I don't see anything I would change, great job.
  20. Do you have an auto-incremented field in your users table? If you do I'm assuming it is their user ID. Just register that ID as the session and it's unique. If you don't want to do that, maybe you can use the function uniqid()
  21. You set a session like this $_SESSION['session_name'] = value; you also need to remember to call session_start() at the top of each page you want the session to carry on to. Sessions tutorial
  22. You need to use mod_rewrite. Here is an article/tutorial on it that will help http://keithdevens.com/weblog/archive/2004/May/24/clean-urls.mod_rewrite.php
  23. You can do it through the URL using GET. So your URL to the page should look something like this www.yourdomain.com/page.php?name=steve Then on that page, you could retrieve the information and do your query like so <?php $name = mysql_real_escape_string($_GET['name']); $query = "SELECT* FROM table WHERE name='$name'"; ?>
×
×
  • 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.