
MasterACE14
Members-
Posts
2,687 -
Joined
-
Last visited
Everything posted by MasterACE14
-
Good Day Everyone, I recently was looking for a decent framework to build a new website on and at a glance Yii Framework (http://www.yiiframework.com/) seemed to suit my needs. But after starting to work with I noticed it is perhaps a little too user friendly. I am now tossing up between CodeIgniter (http://ellislab.com/codeigniter) and PHPDevShell (http://www.phpdevshell.org/). If anyone has any prior experience with either frameworks I would love to hear your thoughts. While Yii generates a lot of code for you, providing a base to work off. I have always preferred building functionality myself in conjunction with a framework that doesn't provide a base for you. Any thoughts, ideas are welcome. Kind Regards, Ace
- 5 replies
-
- framework
- codeigniter
-
(and 1 more)
Tagged with:
-
Making sure only alphanumeric or certain characters
MasterACE14 replied to MasterACE14's topic in Regex Help
cheers mate, appreciate it. -
I'm trying to validate a string so it can only be alphanumeric characters 0-9, a-z, A-Z and the following characters " ", "-", "!", "(", ")", "/", ".", "," Looking at the php manual and a few different tutorial sites I'm not having much luck, I can get the alphanumeric part, but not those other characters. I currently have... $string = "FN#*F#)@)"; // should be invalid if(!preg_match('/^[a-zA-Z0-9]+$/i', $string)) echo "Invalid Input"; Not sure where to go from here. Any help is very much appreciated. Kind Regards, Ace
-
If you need to wear glasses at the SAME time as you have contact lenses in, then you don't have the right contact lense strength.
-
Looks promising!
-
There is of course, plenty of free material online. Like the one on this very site... http://www.phpfreaks.com/tutorial/oo-php-part-1-oop-in-full-effect That way you save some coin.
-
you could of course, make sure you have everything nice and secure so it is unlikely(but not impossible) that you will be hacked in the first place. As for DB admins viewing stuff they shouldn't... if they can't be trusted, why would they be a DB admin in the first place? My two cents. -Ace
-
should add some error checking, rather than assuming that the query will ALWAYS return one or more results. if(mysql_num_rows($result) > 0) { while ($row = mysql_fetch_assoc($result)) { echo '<option value="'.$row["username"].'">'.$row["username"].'</option>'; } } else { echo '<option>No Usernames</option>'; } EDIT: It's probably not displaying any usernames because either the query isn't working as expected, or you have no records in that table.
-
wouldn't really say there's a 'proper' way. More a matter of preference. What you have there is fine.
-
PHP form to image + sending back an email generation
MasterACE14 replied to evlj's topic in PHP Coding Help
this would be a good place to start: http://au2.php.net/manual/en/function.imagecreate.php -
quick question, how do you block w3schools from coming up in search results? browser extension? Google search settings?
-
strip_tags() and stripslashes()
-
PHP & MySQL Tutorials
-
note that it's not only variables that can be passed as arguments, can also pass arrays, objects etc And obviously you don't HAVE to pass a variable, take the following for example... function some_function($text) { return $text; } $message = some_function("my random text"); echo $message; // Output: my random text
-
$config = new JConfig; echo $config->editor;
-
ah true.
-
How to tell someone that stock images look better?
MasterACE14 replied to The Little Guy's topic in Miscellaneous
it doesn't matter how good the food tastes, if it doesn't look appealing in the advertising/website/menu etc, business is likely to suffer. -
how to retrieve very first record in database using ODBC
MasterACE14 replied to kdawg2k12's topic in PHP Coding Help
$sql= "SELECT month,day, time, event,location FROM Events ORDER BY Primary_Key ASC LIMIT 1"; // ORDER BY `id` or whatever in ascending order. Limit to one result only. -
Just note if you have say... $currentversion = '1.0.9'; PFMaBiSmAd's code will return '1.0.10' My code will return '1.1.0' So whatever meets your needs. Cheers, Ace
-
EDIT: PFMaBiSmAd beat me to it $currentversion = '0.2.1'; $v = explode('.', $currentversion); if($v[2] < 9) $v[2]++; elseif($v[1] < 9) { $v[1]++; $v[2] = 0; } elseif($v[0] < 9) { $v[0]++; $v[1] = 0; if($v[1] == 0) $v[2] = 0; } $newversion = implode('.',$v); echo $newversion;
-
nothing looks out of place with the code you've shown, check the code for where the GET is coming from.
-
are you after something like... <?php function parsetemplate($template, $array) { // Replace template with proper content. foreach($array as $a => $b) { $template = str_replace("{%{$a}%}", $b, $template); } return $template; } $test = "this is a test {%email%} message {%gallery%} rtfgdsfgdsfg"; $content['email'] = '[email protected]'; $content['gallery'] = 'random'; echo parsetemplate($test, $content); ?>
-
$newversion = $currentversion . '0.0.1';