No idea how to refactor this into Code Igniter |
[eluser]chobo[/eluser]
I found a pretty good way to add external classes. I add a constant in the index.php that builds off of the other paths already defined. Later I will try to centralize all my paths into one file, and maybe even the base_url, so everything is in one place. Now onto the contact form I actually got it to work, but it's still far from done in my view. Q1: I use to use mysqli_escape_string() on the POST variables, but this doesn't work unless I require it. First, is it even worth doing, or is escaping just for inserting and interacting with databases? Second, if it is worth doing, how can I get access to the $con (connection variable) for the mysqli connection, so I can pass it to the mysqli_escape_string()? I have tried looking for a simple escape function, but they are a little overkill like xss_clean, or they require objects like escape_str(). Q2: I'm trying to improve my coding, so could someone give me a few pointers on how I could refactor the following code? Thanks! Code: <?php |
Messages In This Thread |
No idea how to refactor this into Code Igniter - by El Forum - 07-21-2007, 10:30 PM
No idea how to refactor this into Code Igniter - by El Forum - 07-22-2007, 12:21 AM
No idea how to refactor this into Code Igniter - by El Forum - 07-22-2007, 12:43 AM
No idea how to refactor this into Code Igniter - by El Forum - 07-22-2007, 11:19 AM
No idea how to refactor this into Code Igniter - by El Forum - 07-22-2007, 01:20 PM
No idea how to refactor this into Code Igniter - by El Forum - 07-22-2007, 05:30 PM
No idea how to refactor this into Code Igniter - by El Forum - 07-22-2007, 05:46 PM
|