Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. They probably forgot the meaning of critique when they posted it..
  2. If you ever face something like: $name = stripslashes($_POST['Name']); $email = stripslashes($_POST['Email']); $phone = stripslashes($_POST['Phone']); $address = stripslashes($_POST['Address']); $city = stripslashes($_POST['City']); $number = stripslashes($_POST['Number']); $pettypes = stripslashes($_POST['PetTypes']); $petnames = stripslashes($_POST['PetNames']); $departuredate = stripslashes($_POST['DepartureDate']); $returndate = stripslashes($_POST['ReturnDate']); $specialinstructions = stripslashes($_POST['SpecialInstructions']); You can transform that to: function clean($value) { return addslashes(htmlentities(stripslashes($value))); } $_POST = array_map('clean', $_POST); extract($_POST); //.. "Name: ".$Name."\n" ."Email: ".$Email."\n" ."Phone: ".$Phone."\n" ."Address: ".$Address."\n" ."City: ".$City."\n" ."Number of Pets: ".$Number."\n" ."Pet Types: ".$PetTypes."\n" ."Pet Names: ".$PetNames."\n" ."Departure Date: ".$DepartureDate."\n" ."Return Date: ".$returndate."\n" ."Special Instructions: ".$SpecialInstructions."\n" //..
  3. Ofcourse not!! Daniel is way to smart for any average lawyer..
  4. Hi please post all relevant code as sessions should work because their internals weren't programmed to exclude certain types of programmers.
  5. That is generally called the learning process If you knew all you probably wouldn't be here instead making billion dollar applications ultra-optimized to execute in pico-seconds Hell you would probably take a vacation on Pluto or some other Galaxy far, far away
  6. Should I care? Does he know or even care about what I do?
  7. Sure and when I pass "?id=1 OR 1=1" as my id I would get all his table records. Try schilly's code though I would advice to use trigger_error() in the future instead of die() You can write: $con = mysql_connect("localhost","root"); if (!$con) Like: if (!($con = mysql_connect("localhost","root")) { Depends on what you like alo try to avoid dubble quotes (") if you don't need the extra processing power (eg "hello $world") and use single quotes (') instead 'hello $world' outputs hello $world and does not parse any contained variables. Hope this helps, cheers!
  8. post some more information regarding your database structure
  9. If you aspire to be a designer, sure. If on the other hand you want to become a front-end engineer or back-end engineer why bother?
  10. Why would you emulate a db if you can just use a db?
  11. You can try this: define('MYSQL_ENABLED', function_exists('mysql_connect') ? true : false); define('SQLITE_ENABLED', function_exists('sqlite_open') ? true : false); //.. Then when the user selects a database you can verify that it is available.
  12. Not really, because a person who is using OOP approach in php should know better and use require_once(''); What Mchl said is TRUE that Guru thingie actually means something and if you were to use OOP then you wouldn't even bother using __autoload but you would be smart and be using spl_autoload_register Then why would you use __autoload in the first place? I generally declare a spl_autoload_register class and then leave the require_once out in class files
  13. You know all Palm WebOS apps are created in JS? That's why he said games
  14. To create something like http://devana.eu/devana/imgs/map.jpg You would use: create table world_map ( id integer not null auto_increment, tile_image varchar(255), x_coord integer, y_coord integer, primary key (id)); $user_xcoord = $_GET['xcoord']; $user_ycoord = $_GET['ycoord']; // add proper validation so user can not go out-of-bound $user_xcoord_min = $user_xcoord - 2; $user_xcoord_max = $user_xcoord + 2; $user_ycoord_min = $user_ycoord - 2; $user_ycoord_max = $user_ycoord + 2; $query = "SELECT * FROM world_map WHERE (x_coord BETWEEN $user_xcoord_min AND $user_xcoord_max) AND (y_coord BETWEEN $user_ycoord_min AND $user_ycoord_max)"; $result = mysql_query($query); //..
  15. Apparently the search on this forum to as neil.johnson already found one http://www.phpfreaks.com/forums/index.php/topic,285003.msg1351768.html#msg1351768
  16. It is indeed not good but why not do: $validator = FormElementValidator::findValidator($formElement); if ($validator && $validator->isVaild($formElement)) { Which can be used for each validator
  17. You probably already know this, but that's not valid syntax. I hope it will be someday Like Java " some string here ".trim()
  18. Yeah I'm thinking of creating all my websites like that :evilgrin:
  19. Or if you are looking for a desktop solution: http://www.smashingmagazine.com/2009/03/25/mysql-admin-and-development-tools-round-up/
  20. ignace

    Friends

    I believe you are looking for: http://www.phpfreaks.com/forums/index.php/topic,281823.msg1335964.html#msg1335964 A working example can be viewed at: http://webdevkid.wordpress.com/files/2009/03/twitter-clone.png (please don't mind the text
  21. You can install and use PhpMyAdmin on a single server and manage all your database servers Follow this tutorial to do so: http://www.devshed.com/c/a/PHP/Doing-More-With-phpMyAdmin-Part-1/3/
  22. What do you mean by symbolism? If you get more in-depth with the Google API you'll be able to add history information when someone clicks an arrow on the map. About what kind of grave yards do you store? Old, forgotten grave yards or existing grave yards? I am no designer nor a front-end engineer so it will be quit hard to show you websites I created as I didn't design them, SE optimized nor wrote any HTML, CSS or JS. I only write and optimize PHP and SQL code or some regular project analysis or -design. I also happen to know Java, VB.NET, Assembler, COBOL, .. but PHP is IMO by far the most intriguing language.
  23. What was then the original route you wanted to go?
  24. A few hints for your personal website and graveyard: Personal Website: - Think about what you want to achieve with your personal website? Do you want to attract possible employers? And think about which information they will be looking for. In the example they may be interested in your CV (remember that you are possibly one of many candidates so naming your CV file properly is a good habit, example: cv-nathan-haze-webdesigner) they may also be interested in other information like: how to contact you, blog articles, portfolio, .. The most important information should come on your frontpage as this will be your visitor's main entry point (or landing page) SE optimize your website: your text should reflect what they will most likely be searching for. Graveyard website: - In some way I believe this may have a future altough I'm not entirely sure why you keep such information (tourist sites? possible burying ground?)
  25. Furthermore: # Compiler Turn your code that you wrote in an editior into ones and zeros so your computer can read it. # Interpreter This reads the ones and zeros and does the action Is also false as an interpreter is the same as a compiler it only uses a different approach. PHP and JavaScript are interpreted languages where-as Java and C++ are compiled languages. noobcoding.com is the worst a start-up programmer can come across as it contains more lies then truth. Please direct all traffic from noobcoding.com to a website with more reliable, researched and verified content (like this one for example) rather then just your assumptions. Thank you!
×
×
  • 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.