Jump to content

unkwntech

Members
  • Posts

    447
  • Joined

  • Last visited

Everything posted by unkwntech

  1. This should be posted in the 3rd part scripts area.
  2. Could you model what you want and what your data looks like.
  3. unkwntech

    MVC

    When can MVC architecture is used? -> http://www.phpmvc.net/ What is the differnece between cakephp and php 5.4 which uses the zend engine? -> http://www.cakephp.org/ What is a frameworks in php -> http://phpframeworks.com/index.php5 To answer these question I suggest you read through the main page of all these pages. The project tends to have the most information about itself. But to sum it up a Framework is a way to write less code, but it makes you dependant on someone else's code. MVC and CakePHP are both frameworks.
  4. Could you please post the rest of the script and maybe and example of input data, and your expected output from that data.
  5. $descript = $_POST[[info]; ^ You have a dubble [ Also you definetly want to sanitize those user inputs, check out this function addslashes() http://www.php.net/addslashes
  6. I'm a freelance PHP dev, I build all kinds of things: These are items that my clients have hired me for. All of these are seen by my clients' clients. ECommerce software bug tracking software CMS Query Scripts (to query the status of things like TeamSpeak, Ventrillo, Game Servers, ext) Then there is the stuff that my clients use for only internal use. Call Logs Scheduling software Employee managment Client databases - these are most popular, the client wants something that their remote employees (either telecommuters, or in the field people) can access their customer info. There is more... I spend an average of 18 hours a day in PHP/MySQL.
  7. I would use JavaScript to do the checking because it is client side and will operate even if the server is down.
  8. That is correct. When you call a function with a @ infront of it, php will not output any errors produced by that function.
  9. The JavaScript for that would be this: onLoad="document.formName.submit();"
  10. I assumed that he was removing the php from something submitted by a user.
  11. '/(?:<\?|<\?php)(?:.*|\t*|\r*|\n*|\r\n*|\a*|\e*|\f*|\v*)*\?>/' This is a regex that will catch anything between <? and ?> or <?php and ?> $pattern = '/(?:<\?|<\?php)(?:.*|\t*|\r*|\n*|\r\n*|\a*|\e*|\f*|\v*)*\?>/'; $text = preg_replace($pattern, '', $sourceText); Assumming $sourceText = the text file read in. This is remove any an all PHP from the file and will store it in the $text variable.
  12. I plan out the MySQL tables as best I can but I always seem to be making changes down the road. I NEVER plan code. I ALWAYS plan functionality, however this almost always changes as well. The design gets more planning then anything else and this NEVER ends up as I plan it. So ya, I plan on not sticking to the plan, is usually goes as planned.
  13. Replace: <input type='text' name='amount' size='5' value='<?=$row['amount']?>' /> with: <input type='text' name='amount<?=$row['id']?>' size='5' value='<?=$row['amount']?>' /> Assuming that $row['id'] is the id of the record on the table.
  14. It is possible to send both GET and POST by using method='*' so you could display the data in the address bar but still use the more secure POST method.
  15. The second is definetly JavaScript and it looks somthing like this: <script language="javascript"> function copyChoices() { document.getElementByID('select').innerHTML = document.getElementByID('select2').innerHTML; } </script> <form name="form1" method="post" action=""> <label> <select name="select" size="5" multiple id="select"> <option value="1">Item1 </option> <option value="2">Item2</option> <option value="3">Item3</option> <option value="4">Item4</option> <option value="5">Item5</option> <option value="6">Item6</option> <option value="7">Item7</option> <option value="8">Item8</option> <option value="9">Item9</option> <option value="10">Item10</option> </select> </label> <label> <input type="submit" name="button" id="button" value=">" onClick="copyChoices()"> </label> <label> <select name="select2" size="5" id="select2"> </select> </label> </form> As usual this is rough but this is basicly how it should be. To select multiple you must have the multiple in the tag <select name="select" size="5" multiple id="select">
  16. Allright well thanks anyways guys....
  17. I just read this post and option number 3 has given me some interesting ideas....
  18. To search the database the sql should look somthing like this: $sql = "SELECT links FROM tableName WERE links CONTAINS 'website.com/something.php'"; That should give you the contents of every collumn that contains website.com/somthing.php then you could get either via curl or fopen the file at that link and check for a redirect.
  19. Yah, I was hoping to be able to detect if it was a script or a folder. Anyone know if there is anything like is_dir() that would work on a remote directory?
  20. We used to pull this little trick with MySpace, we would insert an 'image' that was hosted on our servers ex: http://domain.tld/image.jpg however image.jpg would actually be a directory with a index.php that would print the users IP, user-agent and what not. I would like to prevent this on my own projects so I'm wondering if there is an easy way to check if an external image is an image, without having to store it locally. Edit: To clarify I don't want to check if the file is there but I want to check that the file is not a dir.
  21. Not to mention you should use mysql_real_escape_string() to prevent people from running their own queries on you database. For more info see: http://www.php.net/manual/en/function.mysql-real-escape-string.php in preticular example #2
  22. First thing in the logout script you have: //session must be started before anything but i dont see you actualy start the session. secondly unset($_SESSION); is unnecessary.
  23. Hey Guy, Gals I'm working with a large 3rd party class, does anyone know if its possible to print all the functions and their params easily?
×
×
  • 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.