Jump to content

Bendude14

Members
  • Posts

    411
  • Joined

  • Last visited

    Never

Everything posted by Bendude14

  1. if include_once and include fail to "include" the file then the page continues to render where as if require or require_once fail the whole page stops rendering. The difference between require and include and require_once and include_once is that using the "_once" functions means an extra look at the stack to ensure that these files have not already be included and is therefore slightly slower. require_once is often helpful inside an __autoload function used to include classes when designing an OO php system.
  2. Yes google will only see the completed page once your include file has been pulled in. I think you may find your navigation may be a good place to use key words after all they are links to other pages on your site.
  3. Can people please share some experiences with shopping cart software they have used in the past. I don't have time to test them all so I am planning on just taking recommendations from here. It can be free or proprietary but it must have the feature to allow me to switch the "Cart" section off, so it simply looks like a catalog or products. Not sure if that is native to any shopping cart but maybe there is temp plugin i could use to disable prices / checkout etc.
  4. you have an end bracket "}" and the word endforeach remove the word "endforeach"
  5. add an ending php tag before the doctype declaration. ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  6. MrAdam is correct add trim into your function, function filter_tags($tag) { $bad_words = array('bad foo', 'bad bar'); // clean example if( in_array(trim($tag), $bad_words) ) { return true; } }
  7. I presume entetes is is "email" You could look into the 5th parameter to the mail function, if they have upgraded your server this could be the problem. php.net/mail
  8. I don't really understand what your search is going to be based on, maybe an IP Address? I have done this once before using php and the free version of geocity database. www.maxmind.com/app/geolitecity The term you are after sounds like geocoding or geolocating. Googling these terms will probably reveal some more answers
  9. try this $setloggedinsql = "update knusers set online = '" . $loggedinid . "' where username = '" . $usertologin . "'";
  10. can't see anything wrong with how you are using the quotes. Can't really help with the javascript without seeing how you are doing it now?
  11. I don't like to bump topics but I would like some more suggestions on this topic and It's already dropped of to page 3. Kind Regards Ben
  12. You need to access the data from your form using $_POST['user'] etc....
  13. can we see the code, hard to suggest any fixes without previewing the code
  14. hmm I don't think that is what I am after if you are talking about Cascade delete and Cascade Update? I only want to perform this duplication sometimes, not every time I access the database via update etc
  15. tableOne ========== tblOneID Name Value tableTwo ========= tblTwoID ImageUrl Name tblOneID tableThree ========== tblThreeID Name Value tblOneID Ok so above is what the three tables are like and what I need to is duplicate a row in each table, obviously all data is related via "tblOneID" I retrieve the ID from my app for the record to duplicate but once I have duplicated the row in tableOne I need to use the newly generated ID (Its using autoincrement) to duplicate the data in tableTwo and tableThree tableTwo and tableThree may have mulitple records related to the record in tableOne and all Records would need to be duplicated. Make sense? Thanks Ben
  16. I have three tables which build information about one House, could someone please share some ideas on what would be the easiest way to duplicate a house and all its information in all three tables. I know I can execute 3 select statements get all the information I need then insert the new house, select its new unique ID and then insert the rest of the information into the last two tables with the correct ID. I just can't help but think this is a long way round? Maybe there is a SQL way with a temp table which would be more effective, if so I'm sorry for posting this in the wrong forum. Thanks Ben
  17. Please use code tags next time... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <?php include ("login.php");?> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title>Lock Table Head</title> <style type='text/css'> /* DIV container around table to constrict the height for IE (IE ignores the tbody height style) */ div.FixedTableHead { overflow-y:auto; /* this fixes IE so container width is same as table width */ width: expression( (this.childNodes[0].clientWidth + 24) + 'px' ); /* This fixes IE so the container height is table height plus the height of the header */ height: expression( (parseInt(this.childNodes[0].style.height) + this.childNodes[0].childNodes[1].offsetTop + 1) +'px' ); } /* Scrollable Content */ .FixedTableHead table tbody { height:100%; overflow-x:hidden; overflow-y:auto; } .FixedTableHead table tbody tr { height: auto; white-space: nowrap; } /* Prevent Mozilla scrollbar from hiding right-most cell content */ .FixedTableHead table tbody tr td:last-child { padding-right: 20px; } /* Fixed Header */ /* In WinIE any element with a position property set to relative and is a child of */ /* an element that has an overflow property set, the relative value translates into fixed. */ /* Ex: parent element DIV with a class of tableContainer has an overflow property set to auto */ .FixedTableHead table thead tr { position: relative; height: auto; /* this fixes IE header jumping bug when mousing over rows in the tbody */ top: expression( this.parentNode.parentNode.parentNode.scrollTop + 'px' ); } /* Fixed Header */ .FixedTableHead table thead tr td { border-bottom:1px solid #000000; background-color:white; } </style> </head> <body> Lock Table Headings<br /> <div class='FixedTableHead'> <table cellspacing=0 style='height:100px;'> <thead> <tr><td>ID</td></tr> </thead> <?php $query = "select id from master where period='09P3'"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ echo" <tbody><tr><td> {$row['id']}</td></tr> </tbody>"; } echo" </table>"; echo"</div>"; ?> </body> </html> The errors were been caused by your extra quotes on your attributes. I just moved them out of the php section for now. I also added single quotes to your array keys... Doh somoene beat me to it but im posting this anyway...
  18. that code works ok for me. you are selecting a radio button before submitting the form right? Maybe you should add a default selection. just add this to the default radio button selected="selected" Also add error_reporting(E_ALL) see if you get any errors...
  19. yer by all means use javascript to subimt the form its something like form[0].submit but dont take my word for it. a quick google should show u the answer
  20. if thats the register page where is the INSERT statement?
  21. yes they could modify it. If you dont want them to access it use a form and POST the data <input type="hidden" name="damage" value="65" /> Then access it like this $_POST['damage'];
  22. when you say local date are you after a specific time for that user? Can you not just use todays date compared to the release date? Just look on the php.net site at the date functions....
  23. what are you trying to achieve here?.. Including the class is enough to use it, you can't echo a class to the page? What you have now is just like a big string inside $content and the error comes when it finds a end quote but no ";"
  24. can we see the code you used to enter the username and passwords into the database? as already mentioned check the output of sha1($password) against the field stored in your database
×
×
  • 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.