Jump to content

john010117

Members
  • Posts

    492
  • Joined

  • Last visited

    Never

Everything posted by john010117

  1. You got a nice, CSS layout which is great. But I agree with samus. It needs graphics.
  2. Replace with your values. $sql = "insert into Contact (someField, someField2, someField3) values ('$newEntry', '$newEntry2', '$newEntry3')"; Get the pattern?
  3. Put: extract($row); after: while ($row = mysql_fetch_array($result))
  4. I'm glad you used CSS for your layout. The loading times are good. I'll let others comment about the layout (I'm not proficient in creating/commenting layouts... lol)
  5. htmlentities() and/or htmlspecialchars().
  6. Remove the first set of brackets. function session_defaults() { If you have copied that from a tut, look for a different tut.
  7. Change the first query to this: $userquery = mysql_query("SELECT user_id FROM users WHERE user_id = '$_POST[username]'") or die(mysql_error()); I have removed the ' from Username. Do that for all the queries.
  8. First of all, http_referer is NOT reliable (as said in the documentation). You could use str_replace (or parse_url) to strip out the front characters of the url...
  9. Please wait at least an hour before double-posting. We all have lives, you know. Just to simplify things, use the second code. It's guaranteed to work.
  10. I'll be talking about the technical issues. All the links on the top nav bar doesn't work (except for tipsntricks.html). There is no link to the registration page (if there is a registration page). I just typed in a dummy user/pass, and all I got was text. You should add a layout to the processing page also.
  11. You would be interested in reading about mysql_real_escape_string().
  12. Just do another if statement... PHP process a script until it reaches the first TRUE elseif statement, and stops there. But if you put an if there instead, the script will keep on processing all the statements that are TRUE.
  13. Ok... The home page and the other pages should have the same layout. The hovering links on the left should have their hovering color exactly in the black background. The main content table looks ugly. Everything explained
  14. Since I only speak English, I can't really understand the purpose of your website.
  15. I downloaded the package from wampserver.com, and ran the installation exe file. I "turned off" Apache and MySQL (I meant to say MySQL, not PHP) by clicking the wamp icon in the taskbar, and selecting "Stop service" for each one.
  16. On the second script that you've posted... <body bgcolor="#000000" text="#FFFFFF"> <table width="500" border="1" bordercolor="#FFFFFF"> <?php $link = mysql_connect("localhost", "****", "****"); if (!$link) { die('Could not connect: ' . mysql_error()); } $db_selected = mysql_select_db("mitact_mitact"); if (!$db_selected) { die ('Can\'t use foo : ' . mysql_error()); } $genre = null; $result = mysql_query("SELECT * FROM `Bands_Genre`"); if (!$result) { die('Invalid query: ' . mysql_error()); } while ($row = mysql_fetch_array($result)) { $genre[$row["gid"]] = $row["name"]; } mysql_free_result($result); $band_name = urldecode($_GET['band']; $band_name_escaped = mysql_real_escape_string($band_name); $result = mysql_query("SELECT * FROM `Bands_Confirmed` WHERE `bandname` = '$band_name_escaped'"); if (!$result) { die('Invalid query: ' . mysql_error()); } addslashes($result); while ($row = mysql_fetch_array($result)) {//while fetch BEGINS ?> <tbody> <tr> <td colspan="2"> <h2><?php echo $row["bandname"];?></h2> </td> </tr> <tr> <td colspan="2"> <ul> <li>Genre 1: <?php echo $genre[$row["genre1"]];?></li> <?php if ($genre[$row["genre2"]]<>"") {echo'<li>Genre 2:',$genre[$row["genre2"]],'</li>';}?> <?php if ($genre[$row["genre3"]]<>"") {echo '<li>Genre 3:',$genre[$row["genre3"]],'</li>';}?> <li>Original music, Covers or Both: <?php echo $row["type"];?></li> </ul> </td> </tr> <tr> <td colspan="2"> <div> <dl> <dt><?php echo $row["contact1"];?></dt> <?php if ($row["contact1number"]<>"") {echo '<dd>',$row["contact1number"],'</dd>';}?> <dd><?php echo $row["email1"];?></dd> <dt><?php echo $row["contact2"];?></dt> <dd><?php echo $row["contact2number"];?></dd> <dd><?php echo $row["email2"];?></dd> <?php if ($row["managerdetails"]<>"") {echo '<dt>Manager details</dt>'; echo '<dd>',$row["managerdetails"],'</dd>';}?> <?php if ($row["managerdetails"]<>"") {echo '<dt>Booking agent</dt>'; echo '<dd>',$row["bookingagentdetails"],'</dd>';}?> </dl> </div> </td> </tr> <tr> <?php if ($row["myspace"]<>"") {echo '<td width="250">','MySpace: <a href="'; echo $row["myspace"]; echo'">',$row["myspace"],'</a></td>';}?> <?php if ($row["website"]<>"") {echo '<td width="250">','Website: <a href="'; echo $row["website"]; echo'">',$row["website"],'</a></td>';}?> </tr> </tbody> <?php } //END WHILE mysql_free_result($result); mysql_close($link); ?>
  17. Hi. I'm not really used to having servers installed on my [old] comp. I've installed WAMP successfully, and verified that it runs correctly. But when I turn of both the Apache server and PHP, the process named httpd.exe is still running. When I try to end the process, it says that I don't have the permission to do that (even though I'm the only admin on the comp). How do I turn it off? BTW, I have Windows 2k.
  18. If you want to do it like that, use sessions. Start a session at the form, and check to see if the session's there on the processing page.
  19. I've had this problem before. Use mysql_real_escape_string() on the string the user's searching for.
×
×
  • 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.