|
Exactly.
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
What level of validation is enough?
I think that using prepared statements with parameters is the safest way, what do you think ?
|
|
|
|
|
SQLi is best handled using the database's native escaping routines and not just relying on addslashes() -- there is actually a way to circumvent addslashes from what I remember.
Filtering is probably a good practice as well.
To avoid escaping, you could just use PDO and prepared statements which handles the escaping for you automagically as well.
I'm finding the only constant in software development is change it self.
|
|
|
|
|
Hi friends.
I usually use Smarty to create templates.
When I wanted to create somethings like this :
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test</title>
</head>
<body>
<table>
<tr>
<td> </td>
</tr>
</table>
<table>
<tr>
<td> </td>
</tr>
</table>
<table>
<tr>
<td> </td>
</tr>
</table>
<table>
<tr>
<td> </td>
</tr>
</table>
</body>
</html>
I created three files ( for example Header.tpl , Footer.tpl , Body.tpl )
Header.tpl :
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test</title>
</head>
<body>
Body.tpl :
<table>
<tr>
<td> </td>
</tr>
</table>
Footer.tpl :
</body>
</html>
Then I wrote this Smarty code in PHP to created above HTML file :
$smarty -> display('Header.tpl');
for ($i=0; $i<=3; $i++)
$smarty -> display('Body.tpl');
$smarty -> display('Footer.tpl');
This way is bad, because designing template is very difficult.
Are there any ways to use Smarty and create above HTML file.
Thanks in advance
Sorry for my English. I'm a freshman .
|
|
|
|
|
Can't you just output the HTML? It doesn't stop normal PHP from working.
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Thanks Bradml.
Bradml wrote: Can't you just output the HTML?
Yes, I can. but I want generate output by SMARTY !
Sorry for my English. I'm a freshman .
|
|
|
|
|
.... why? What benefit does that provide?
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Bradml wrote: What benefit does that provide?
With Smarty you can sift Template through program , so we can change template easily.
Sorry for my English. I'm a freshman .
|
|
|
|
|
Ok, well sorry I haven't really looked into Smarty so I'm not going to be of too much help. Check out the Smarty Forums[^]. They can probably help you out.
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
OK, That's all right. Thanks
Sorry for my English. I'm a freshman .
|
|
|
|
|
I want to place image generating code in my webpage, but it is working fine alone..
But when I implement that code in my webpage it doesn't work..
Mohsin Ali
|
|
|
|
|
Can you tell us what happens? Does it through errors? Can you show us the code?
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
It's hard to say without any code .
Write your code Ali
Sorry for my English. I'm a freshman .
|
|
|
|
|
I want to implement CAPTCHA on a simple web form...
Is there any easy example to implement it..
Mohsin Ali
|
|
|
|
|
|
Nice answer!
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Hi.
I'm looking for a good PHP IDE. Do you know what PHP IDE is better ?
Sorry for my English. I'm a freshman .
|
|
|
|
|
M using Dreamweaver since last two years.... I also used other IDEs for PHP but found Dreamweaver as the best..
Mohsin Ali
|
|
|
|
|
In my opinion you cannot beat Zend. They make the best IDE out there. Check out their website.[^]
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
I used zend, its good.............. but damn slow due to java...
Mohsin Ali
|
|
|
|
|
The Linux version runs like a dream.
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
What about PHP EDIT 2 ?
Sorry for my English. I'm a freshman .
|
|
|
|
|
Depends on what you want or need. Personally I'm happy with a super charged Notepad.
I use UltraEdit. I love the source folding feature and column selection is handy when pasting in cities, postal codes, etc. Or formatting code to you liking when you copy from somewhere else.
I'm finding the only constant in software development is change it self.
|
|
|
|
|
I downloaded that PHP extension for Visual Studio 2008...
{from http://www.jcxsoftware.com/vs.php}
I have installed it but getting some errors on creating project...
Mohsin Ali
|
|
|
|
|
I tried it for a day and found it to be a waste of time.
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|