Jump to content

SharkBait

Members
  • Posts

    845
  • Joined

  • Last visited

    Never

Everything posted by SharkBait

  1. I get nothing ;)  A Page Cannot Be Found.
  2. If you manage to block them from getting into your images directory, you could then use .htaccess and an Apache Mod_rewrite and block hotlinking to the images. I don't have my sample of denying hot-linking of images/pdfs because my server is currently down until I go in tomorrow to turn it on.
  3. What about [code=php:0] foreach($_POST['faq_Model'] as $item1 => $item2) {   echo "{$item1} -- {$item2} <br />"; } [/code] Just trying to debug your $_POST['faq_Model'] variable to see what it's storing.
  4. You want more of a global variable?  Set it ones and then all pages after it's been set will use that value?
  5. <title></title> needs to be placed in the <head></head> section of your page. [code] <?php $myTitle = "This is my website"; ?> <html> <head>   <title><?php echo $myTitle;?></title> </head> <body>   This is where the content of the website goes </body> </html> [/code] As for where you get the information from, it could be set statically like it is in my above example or pulling from a Database such as MySQL which would/could be more dynamic.
  6. $_REQUEST I believe is like $_GET which gets their values from a URL. So you would use them like this: [code=php:0] $myValue = $_GET['id']; [/code] The rest of it I am unsure of what you are asking.
  7. What do you get when you [code=php:0] print_r($_POST['faq_Model']); [/code] after you've submitted the form?
  8. [quote author=jsladek link=topic=115024.msg468199#msg468199 date=1163557993] Just wrote this real quick [code] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <body> <center> <? foreach (glob("images/*.*") as $filename) {       print("<a href=\"$filename\">$filename<br><img src=\"$filename\"></a><hr>"); } ?> </center> </body> </html> [/code] Regards, John Sladek can someone tell me how to put code in the post highliged as PHP.  I'm using the [ c o d e] tags [/quote] Just use <?php  and ?> inside your [ co de] tags :)
  9. Do you submit a form prior to getting to that section with the back button?
  10. Check to make sure anywhere above where you issue the header() function that there is no text being sent to the browser.  No echo's, print() etc.
  11. My eyes are bugging out but let me see if I understand this: You have a database with listings by IDs. You have a folder that contains photos that have a prefix of the IDs that are in the database and a suffix of the image number. Then you want to fix any of the filenames so they they are sequential? You want your script to go into the photo directory, pull all the filenames, fix them and then insert the fixed filenames into the database corrisponding to the IDs correct?
  12. I dont know code wise but... You could go through the directory of images with PHP and look at the file names.  Create arrays based on the ID from the filename by somehow parsing out the image numbers. 12345_02, 12345_05, 12345_29, 12344_01, 12344_02, 12344_19, 12344_45 would be placed into an array like: [code] <?php $images = array(12345 => array('02', '05', '29'), 12344 => array('02', '19', '45')); ?> [/code] Then you would just have to loop through the array and insert them into the database :) Hopefully the idea is there to help ya out.
  13. read is a function of MySQL Enclose read with backticks (next to the 1 key) [code] <?php UPDATE privatemessages set `read` = '1' WHERE id = '{$id}' ?> [/code]
  14. Change it to read: [code] <?php $result2 = mysql_query($sql2, $connection) or die("MySQL Error: <br />{$sql2}<br /> ". mysql_error()); ?> [/code] the die() section will stop the rest of the script and the mysql_error() will output what is wrong if its a MySQL issue.
  15. Can you post the entire code? Do you check for a user_name that is already taken?  That would stop the double INSERT at that level. Pehaps there is an odd loop happening..?!?
  16. I haven't seen this happen and I code my sites in Firefox, then check them on IE and then whatever other browser I feel like loading up. If ya want, post the code that you think is looping :)
  17. Can ya explain what the >> does with the hex values?
  18. Ok,   I am trying to figure this out, if I enter the HEX color of 336699 that would break down to: Red: 51 Green: 102 Blue: 153 Correct? I would need to split the hex value into 3 values and then convert those to their decimal values right? Would I go about splitting them up every 2 characters, and then convert hex -> dec on those 3 seperate values? Or is there a better way to do this? Thanks.
  19. I dont know if there is a better way but I do it like this: [code] $links = "item1 | item2 | item3 |"; substr($links, 0, strlen($links)-2); [/code] I'm sure there is an easier way but I just knock of  the last few chacters if you know there will always be 1 or 2 characters after the string.
  20. On thing I do with my queries that is easier to debug would look like this: [code] <?php $str = "UPDATE gal_galleries SET title='{$title}',description='{$description}' WHERE id='{$id}'"; // If there is an error the script will DIE and tell you why $query = mysql_query($str) or die("MySQL Error: <br /> {$str} <br />". mysql_error()); // $num will return how many rows were updated from the query if successful $num = mysql_affected_rows(); if($num > 0) {   echo " Gallery {$title} has been updated."; } else {   // Technically if your query doesn't work you wont get here } ?> [/code]
  21. Do you have access to the server itself? At a command prompt type: mysql -u yourusername If it lets you in then you know your username and you don't need a password to get in. :)
  22. This is an HP SAN (Storage Area Network) Array: http://h18006.www1.hp.com/products/storageworks/msa1000/index.html Though being anywhere around $20,000 they're not cheep ;) 
  23. Using AdWords with Google could work. Local papers would be good too, now if only I could get more work myself. I would love to get more into web design than I am now, I really do enjoy it.
  24. But the error its telling you is that it cannot connect to the database. The (user password: NO) means that the 'nobody'@'localhost' account does not need a password. Does 'nobody' exist in the priveleges for the database?
  25. That comment about Geocities and MySpace sounds familar. I miss Geocities it was cool back in the day when I needed a free webhost to tinker around with. I dont have a MySpace account, no reason too either. I have my own webservers and my own web development knowledge. What I hate is when people think something on the web is the internet. Bob: OH yea, I'm using the internet, come see my page at blahblahlbah BobbySue: I can't get the internet to work, the Big Blue 'E' isnt doing anything when I click on it How I miss the days of IRC (when EfNet was the only one around), Archie, Veronica, Gopher, and Mosaic was the only graphical web browser.  Lynx was my best friend.... When no on knew about Napster and it wasn't corrupted by computer illiterate people etc ;) </rant> Geesh I feel old, but I'm not really not 'old'...
×
×
  • 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.