Register
FAQ
Calendar
Search
Today's Posts
Rules
Guidelines
SMS enable your application
via Clickatell’s fast, simple and reliable API's, built to integrate with any system.
Click here
to learn more.
Flash Website Builder
- Trendy Site Builder is a Flash Site Building tool that helps users build stunning websites.
Check Out Custom
Custom Logo Design
by LogoBee. Website Design and Free Logo Templates available.
CodingForums.com
>
Search Forums
Search Results
User Name
Remember Me?
Password
Before you post, read our:
Rules
&
Posting Guidelines
Page 1 of 10
1
2
3
>
Last
»
Showing results 1 to 25 of 239
Search took
1.68
seconds.
Search:
Posts Made By:
idalatob
Forum:
Post a PHP snippet
12-18-2012, 07:19 AM
Replies:
9
Switch between local and live
Views:
1,064
Posted By
idalatob
Its a bit hitched from the Zend Framework. ...
Its a bit hitched from the Zend Framework.
Its not specific to any particular framework or server. (I suppose you would have to have apache and use virtualhosting)
Whats really cool about this...
Forum:
PHP
12-17-2012, 03:52 PM
Replies:
53
PHP / MsSQL
Views:
1,261
Posted By
idalatob
Dont forget to actually connect to the database....
Dont forget to actually connect to the database. Also, setting display errors might also help eg:
//show errors
ini_set("display_errors", "on");
//connect to mssql database
Forum:
PHP
12-17-2012, 03:40 PM
Replies:
53
PHP / MsSQL
Views:
1,261
Posted By
idalatob
<?php /** First thing, we create a...
<?php
/**
First thing, we create a function that will make your data safe!
**/
function mssql_escape($data) {
if(is_numeric($data))
return $data;
$unpacked =...
Forum:
PHP
12-17-2012, 03:36 PM
Replies:
53
PHP / MsSQL
Views:
1,261
Posted By
idalatob
Fou-Lu doesnt take kindly to mistakes. :-P
Fou-Lu doesnt take kindly to mistakes. :-P
Forum:
PHP
12-17-2012, 03:32 PM
Replies:
5
How to send the image to the email box?
Views:
349
Posted By
idalatob
Some email clients have actually started blocking...
Some email clients have actually started blocking text too. Now we're at a situation where you have to use whitespace to get your message across.
Forum:
PHP
12-17-2012, 03:25 PM
Replies:
53
PHP / MsSQL
Views:
1,261
Posted By
idalatob
Ok lets sort you out. First of all, I...
Ok lets sort you out.
First of all, I apologize for sending you down the mysql road, when you're clearly using mssql.
So, lets resolve all the mysql related functionality out of your code.
...
Forum:
PHP
12-17-2012, 03:03 PM
Replies:
53
PHP / MsSQL
Views:
1,261
Posted By
idalatob
Bugger it. I wrote all that stuff for mysql....
Bugger it. I wrote all that stuff for mysql. Facepalm.
Same applies generally. Switch to mysql. :-P
Forum:
PHP
12-17-2012, 03:02 PM
Replies:
53
PHP / MsSQL
Views:
1,261
Posted By
idalatob
6.) Do some validation on your code. With the...
6.) Do some validation on your code. With the current mechanism you have, anyone could go hacking in any values. See below example.
if (isset($_POST['any_field_other_than_submit'])) {
...
Forum:
PHP
12-17-2012, 02:55 PM
Replies:
53
PHP / MsSQL
Views:
1,261
Posted By
idalatob
Also, im assuming you are trying to add more than...
Also, im assuming you are trying to add more than one value into the db?
This is the syntax you can follow:
/**
Prevent mysql injection
**/
foreach ($_POST as $key=>$value) {
Forum:
PHP
12-17-2012, 02:51 PM
Replies:
53
PHP / MsSQL
Views:
1,261
Posted By
idalatob
Quite a few suggestions: 1.) Read up on the...
Quite a few suggestions:
1.) Read up on the syntax to insert a record into mysql. http://www.tizag.com/mysqlTutorial/mysqlinsert.php
2.) You arent actually telling mysql to do anything.
$query...
Forum:
PHP
12-17-2012, 11:08 AM
Replies:
20
Echo 'Merry Christmas';
Views:
926
Posted By
idalatob
WOOOHOOO! MY TURN! $days = array( ...
WOOOHOOO! MY TURN!
$days = array(
"First" => "a faulty line of code",
"Second" => "a segmentation fault",
"Third" => "a server crash",
"Fourth" => "a newbie programmer junior",
"Fifth" =>...
Forum:
Post a PHP snippet
12-17-2012, 10:55 AM
Replies:
9
Switch between local and live
Views:
1,064
Posted By
idalatob
Not that andrew's way isnt awesome! Just chipping...
Not that andrew's way isnt awesome! Just chipping in.
Forum:
Post a PHP snippet
12-17-2012, 10:40 AM
Replies:
9
Switch between local and live
Views:
1,064
Posted By
idalatob
Here's a cool way of doing it too: //in your...
Here's a cool way of doing it too:
//in your php config file
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') :...
Forum:
PHP
12-17-2012, 10:10 AM
Replies:
5
Problem with require_once
Views:
351
Posted By
idalatob
You could just change require_once to...
You could just change require_once to file_get_contents... That will 'call' the script like you are doing in your web browser and return the contents. This isn't strictly the correct way of doing it...
Forum:
PHP
12-17-2012, 09:48 AM
Replies:
5
is there any way to use php code in .txt file
Views:
371
Posted By
idalatob
You could then get the result of the page like...
You could then get the result of the page like this:
$result = file_get_contents("http://mydomain.com/test.txt");
Forum:
PHP
12-17-2012, 09:45 AM
Replies:
5
is there any way to use php code in .txt file
Views:
371
Posted By
idalatob
Im guessing you are checking what output the .txt...
Im guessing you are checking what output the .txt file provides and not the actual contents:
IE:
echo("1"); // you want to get the 1 and not the full string?
If you do, there is another way...
Forum:
PHP
12-11-2012, 01:15 PM
Replies:
7
Problems with my date format
Views:
303
Posted By
idalatob
The problem is, the date function expects a...
The problem is, the date function expects a timestamp as the second parameter and not a mysql date.
Try this:
$N_pub_date = strtotime("{$row['pub_date']}");
$N_pub_date = date("m/d/y",...
Forum:
PHP
12-11-2012, 11:08 AM
Replies:
4
Who's your mamma.... Sorting question.
Views:
303
Posted By
idalatob
Maybe a little complex. Absolutely no insult to...
Maybe a little complex. Absolutely no insult to you of course.
But this link here may apply to what you are trying to do:
http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/
Forum:
PHP
12-04-2012, 10:48 AM
Replies:
3
Need help with this PHP code
Views:
350
Posted By
idalatob
Although this is already resolved, I thought I...
Although this is already resolved, I thought I would chime in with some advice as to how I would solve it.
/**
* A list of addOns available and the associated price
*/
$addOns = array("ham...
Forum:
PHP
10-23-2012, 11:31 AM
Replies:
2
Using exec function to get rDNS info, is there a better way?
Views:
248
Posted By
idalatob
I reckon, store the ip addresses in a temporary...
I reckon, store the ip addresses in a temporary table.
Then, run a cron job, which implements some form of caching to translate the ip addresses into domain names. The caching wont help a...
Forum:
PHP
10-23-2012, 09:41 AM
Replies:
5
Beginner needs help with loop
Views:
295
Posted By
idalatob
Heres another more retarded version, utilizing...
Heres another more retarded version, utilizing some amazing typecasting functions from php:
$tmp = (string)$i;
$b = !($tmp{strlen($tmp) -1}) ? "<br>" : ",";
echo($i . $b);
Forum:
PHP
10-23-2012, 09:30 AM
Replies:
5
Beginner needs help with loop
Views:
295
Posted By
idalatob
Bored at work... $b = !((bool)$i % 10)...
Bored at work...
$b = !((bool)$i % 10) ? "<br>" : ",";
echo ($i . $b);
I challenge you all to come up with a more convoluted way of doing this.
Forum:
PHP
10-23-2012, 09:22 AM
Replies:
4
[HELP]Undefined index Error
Views:
372
Posted By
idalatob
Couple of small tips: //use 'isset' to...
Couple of small tips:
//use 'isset' to determine if a variable exists
if (!isset($_POST['gameid'])) {
die("No game defined");
}
//escape any content you may be getting from the user...
Forum:
PHP
09-14-2012, 02:17 PM
Replies:
8
clone vs. new
Views:
496
Posted By
idalatob
Bet you fou-lo will give us a bad *** answer...
Bet you fou-lo will give us a bad *** answer...
Forum:
PHP
09-14-2012, 02:07 PM
Replies:
8
clone vs. new
Views:
496
Posted By
idalatob
Cloning doesnt copy internal objects. Whereas new...
Cloning doesnt copy internal objects. Whereas new creates NEW objects. They are not the same.
EG:
<?php
class foo {
private $_bar;
function __construct(){
Showing results 1 to 25 of 239
Page 1 of 10
1
2
3
>
Last
»
Forum Jump
User Control Panel
Private Messages
Subscriptions
Who's Online
Search Forums
Forums Home
:: Client side development
JavaScript programming
DOM and JSON scripting
Ajax and Design
JavaScript frameworks
Post a JavaScript
HTML & CSS
XML
Flash & ActionScript
Adobe Flex
Graphics and Multimedia discussions
General web building
Site reviews
Building for mobile devices
:: Server side development
Apache configuration
Perl/ CGI
PHP
Post a PHP snippet
MySQL
Other Databases
Ruby & Ruby On Rails
ASP
ASP.NET
Java and JSP
Other server side languages/ issues
ColdFusion
Python
:: Computing & Sciences
Computer Programming
Computer/PC discussions
Geek News and Humour
Web Projects and Services Marketplace
Web Projects
Small projects (quick fixes and changes)
Medium projects (new script, new features, etc)
Large Projects (new web application, complex features etc)
Unknown sized projects (request quote)
Vacant job positions
Looking for work/ for hire
Project collaboration/ partnership
Paid work offers and requests (Now CLOSED)
Career, job, and business ideas or advice
Domains, Sites, and Designs for sale
Domains for sale
Websites for sale
Design templates and graphics for sale
:: Other forums
Forum feedback and announcements
All times are GMT +1. The time now is
06:02 AM
.
Web Hosting UK
|
Dedicated Server Hosting
|
Shareware Junction
|
Software Geek
|
Flash file uploader
|
Cloud Server
|
Web Hosting Australia
Home
-
Contact Us
-
Archives
-
Link to CF
-
Resources
-
Top
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.