Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. humm this works <?php $string = 'Hello [quote] how are you [\quote] sorry'; $pattern[] = '/\[quote\].*\[\\\quote\]/'; $replacement[] = 'oops'; echo preg_replace($pattern, $replacement, $string); die; ?> Updated Sorry still learning RegEx
  2. oops mis read try <?php $string = 'Hello [quote] how are you [\quote] sorry'; $pattern[] = '/\[quote\].*\[\quote]/'; $replacement[] = 'oops'; echo preg_replace($pattern, $replacement, $string); die; ?>
  3. What about this <?php $string = 'Hello [test1] how are you [test2]'; $pattern[] = '/\[test1\]/'; $pattern[] = '/\[test2\]/'; $replacement[] = 'world'; $replacement[] = 'today'; echo preg_replace($pattern, $replacement, $string); ?>
  4. change to $query = "INSERT INTO my_details VALUES ('$id','$name','$location')"; Note the last ' before ) and $location = "The Location's going somewhere"; to $location = "The Location's going somewhere"; $location = addslashes($location );
  5. Why are you converting on the fly anyways ?
  6. your need to connect lookup the IP in the ISP sets and then get their country and time.. this means a large database or connecting to someone elses most likely a paid for service,
  7. only use 1 % ie SELECT * FROM TABLE WHERE NAME LIKE "%Techie%"
  8. \r\n = Return & NewLine remove the \r
  9. use AJAX
  10. you can't use hotmail..
  11. 2 links one should help Option 1 Option 2
  12. to setup a database in cPanel follow these steps 1. Load up cPanel 2. goto MySQL® Databases 3. Create a Database 3.1 find "New Database: " (in the 'Current Databases' section) and type the database name and click Create database for this example i am going to use "MyDatabase" the Next screen should say SIDE NOTE: on my account the database is prefixed with the domain name ie MyDome_MyDatabase Keep note of this 3.2 Click Go Back 4. Now Create the user account 4.1 goto the 'Current Users' section 4.2 Enter a username and password (for this example i am going to use User:User and Password: Pass) 4.3 click Create User you should see the following screen SIDE NOTE: on my account the username is prefixed with the domain name ie MyDome_user, the password isn't, Keep note of this 4.4 Click Go Back 5.0 setup access 5.1 goto Add Users To Your Databases section 5.2 change user to 'user' (in my case MyDome_user) 5.3 change database to 'MyDatabase' (in my case MyDome_MyDatabase) 5.4 under Privileges: select ALL (you can change this later but for testing use all) 5.5 Click Add User to Database you should see a screen like this So User:MyDome_user pass:password database:MyDome_MyDatabase host:local i hope that helps
  13. Theirs 101 way it could of happened, from a secuirty hole in the web server, system or even a script.. Check the Raw Logs
  14. LOL, i missed it as well
  15. what about this in your SQL statment "SELECT * FROM Table ORDER BY {$_GET['Field']} ASC"
  16. try $userAccess = (int) getAccessLevel(); incase its set as a string also can you post the function getAccessLevel()
  17. Well i just done a CICO, C*** In C*** OUT if it works i am the dog's ... if not then oh well PS it's called OT Overseas Telepathic basically the same but costs a little more and also a bit fuzzy at times
  18. I am here to help not to write the whole thing for you, their are many sections if you don't know how to use MySql with PHP you could of just asked what i posted was an example (which i updated to as it included some OOP) anyways good luck and good day
  19. $result = mysql_query("SELECT * FROM person WHERE FirstName='Peter' AND upload_votes >= 3 ORDER BY upload_votes ASC LIMIT 1");
  20. just a basic loop <?php $MyArray = array(); for($n = 0; $n < $rows; $n++) { $mysql_fetch_assoc($n); $MyArray[] = rows['TheData']; } ?> *untested
  21. humm javascript or sockets..
  22. <form action="http:\\host\remotefile.php" method="post"> <input name="data" type="text" /> </form>
  23. what about a basic database script or even flat file ? what are you trying to do ?
×
×
  • 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.