Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. "INDEX,FOLLOW" are the default values for the googlebot meta tag, which makes it's use unnecessary in most cases. Most likely people do not understand the use of it and have used it regardless, or they have previously had different values and need Google to register the difference. I shouldn't think it would make a difference to you if you use it or not. http://answers.google.com/answers/threadview?id=138269
  2. A search crawler will index your site unless it discovers a tag telling it not to. I don't think there's any use for the example you provided. Take a quick look at this article.. http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=93710
  3. You just wouldn't specify a condition, for example: $sql = "select * from colours"; if (isset($_POST['Colour'])) { $colour = mysql_real_escape_string($_POST['Colour']); $sql .= " where colour='{$colour}'"; } // run query
  4. Shouldn't matter as switch's based on loose comparison.
  5. Not that this would be causing the problem, but the 4th parameter for mysql_connect isn't the database name; read the manual for more info. The methods you've used for connecting are a little unorthodox, but I can't see any reason why this wouldn't at least display an error. Ensure all error reporting is on and that the connection values are all correct... Perhaps then debug the code line by line to find the point where the code beaks.
  6. Yeah an array is your best bet, something like... HTML side of things: <input type="checkbox" name="name_here[]" value="checkbox value here" /> <input type="checkbox" name="name_here[]" value="another value here" /> PHP side: foreach ($_POST['name_here'] as $checkbox_value) { // insert $checkbox_value into DB } ----------- Not sure if this is the direction you're wanting to go in, but you could extend this to add in a unique name for each check box too, like this: <input type="checkbox" name="name_here[name1]" value="name 1 value" /> <input type="checkbox" name="name_here[name2]" value="name 2 value" /> foreach ($_POST['name_here'] as $checkbox_name => $checkbox_value) { // insert $checkbox_name and $checkbox_value into DB }
  7. Try: foreach ($info as $i) { echo $i['uid'][0] . '<br />'; }
  8. Your array spans into a third dimension, try: foreach ($info as $v1) { foreach ($v1 as $v2) { if (is_array($v2)) { foreach ($v2 as $v3) { echo $v3; } } else { echo $v2 . "<br />"; } } }
  9. ...Or just right click > view source.
  10. Hah errrrrr, sounds like something Craig David would do!
  11. You can use a loop within a loop, you'd be best using foreach as well, much simpler. The manual contains example of how to loop through multi-dimensional arrays with foreach.
  12. The original code you posted isn't even in that...
  13. Show the code you have now? Try using a syntax highlighter, they can often point out small syntax errors, especially when it comes to strings.
  14. Looking for mod_rewrite.
  15. I couldn't make out what you were trying to say there, but it should be: $text = '[b][quote]$reply[/quote][/b]';
  16. Adam

    php form

    What's your question?
  17. It doesn't matter whether you use POST or GET methods, the user wouldn't even need to go as far as cURL. With the Firebug extension you can quite literally edit the HTML for a website and use it as though it was the original (although you don't need Firebug to do this it makes it a hell of a lot quicker). This means they could simply edit your HTML, create a quick 'POST' method form containing all the parameters they liked, and then submit it.
  18. First you need to check the file extension is allowed. There's plenty of methods both on here and Google if you do a quick bit of searching, they shouldn't be hard to implement. However you've hard-coded ".jpg" onto the end of your files, and I'll bet your resize() function doesn't cater for anything for other. The problem here being PHP use specific functions for different image formats whilst manipulating them, for example take a look at the imagejpeg function, and note the other functions in the 'see also' section. Post the content of the resize() function and should be able to help...
  19. Actually last night I noticed a lot of lags from about 7 till 7:07 (GMT). I thought it was my connection at first but other pages worked no problem. Seemed to be the during loads the pages were taking either really long to load, or started loading, say the header and nav, then paused for a while and then finally finished. There also seemed to be spikes, like for a few seconds it'd work fine but then slowed right down again.
  20. Based on just that snippet I can't tell if the problem is that you're not echo'in out the HTML / closing and opening the tags correctly. Or whether you're trying to define a variable without enclosing it in PHP tags. For the former: $pdfloc = "file://asecasiagsd/AGS/AGS/WIP/upload/".$pdf; echo '<td height="0" colspan="2"><a href="' . $pdfloc . '" target="_blank">' . $pdfloc . '</a></td>'; ... and for the latter: <?php $pdfloc = "file://asecasiagsd/AGS/AGS/WIP/upload/".$pdf; ?> <td height="0" colspan="2"><a href="<?php echo $pdfloc; ?>" target="_blank"><?php echo $pdfloc; ?></a></td>
  21. I don't think he was intently trying to stuff in random keywords to get more visitors, just trying to add in some extra content without realizing it's a bad technique to try and use.
  22. if (mysql_num_rows($result2) > 0) { //... }
  23. Well yeah, but there must be a reason for needing it. Quite possibly it's used as a form of spam protection though.
  24. I'm generally going to assume registering another account and clicking the submit button, within the 30 seconds, would make no impact to the other account at all. How would a proxy effect it?
  25. Can't help you unless you show the entire code for db_connect.php and functions.php ..
×
×
  • 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.