-
Posts
1,187 -
Joined
-
Last visited
-
Days Won
1
Posts posted by tibberous
-
-
I am REALLY tired I have to type:
$city = mysql_real_escape_string(trim($_REQUEST['city']));
$state = mysql_real_escape_string(trim($_REQUEST['state']));
ect...
Its like 15 lines of copy and pasted crap everytime I have a form.
Here is my idea - variable contexts.
It would work like this:
define context ":" ($x) {
return mysql_real_escape_string(trim($x));
}
Then, instead of saying:
$city = mysql_real_escape_string(trim($_REQUEST['city']));
You could just use:
$:city
-
I have a two-shot .38
-
That's why I'm also getting a rottweiler too
I was actually thinking about getting one of these: http://www.dogbreedinfo.com/caucasianowtcharka.htm
But I figured a rottweiler would be easier to handle, take to the vet, ect.
-
I am buying a house and want to setup a large camera system so I can see most of the rooms in the house at all times, as well as the perimeter of the house. I was thinking I'd need like 6-8 outdoor night vision cameras, 5-10 room cameras, that don't really need audio.
I could get a complete setup for like $3,000, but I was thinking I might do better to get the main unit off newegg and then add the cameras as needed. Anyone ever set a system up?
-
Well, I was trying to use the PHP5 cli like the PHP4 cli, where you just typed "php x.php"
I guess they changed it so you have to put "php -f x.php"
But then what does not using the -f parameter do? Just type senselessly and have to reopen command prompt?
-
I run php.exe from the command line (version 5.2). It lets me type, seemingly indefinitely.
Is this used for something? Like, can I type code and then somehow say I'm finished and have the code run?
-
For jpegs and pngs and gifs I just use imagecreatefrompng, ect.
There isn't a imagecreatefrombmp file though. There is a imagecreatefromwbmp, but that doesn't work with my bitmap, so I'm guessing it is for a different type of file completely.
Does anyone know how to do this? I have a customer who really wants to be able to upload his bitmaps =/
-
echo ($_POST['number'] % 5 ? '' : "{$_POST['number']} is divisible by 5.");
-
I think the days Friday and Monday should be 7 hours. Monday should start an hour later, Friday end an hour sooner.
-
That sounds about right -- its VERY rare I find myself upset at PHP. ActionScript always pisses me off, but in fairness, it does more than PHP.
-
if(mysql_num_rows(mysql_query("select `id` from `backupsystem` where `domain`='$site'")))
Don't think it is a code problem, here is the error:
Fatal error: Call to undefined function mysql_num_rows() in C:\BackupSystem\upda
teList.php on line 23
-
I'm getting an error that mysql_num_rows and mysql_result are undefined. Whats really weird is that mysql_connect and mysql_select_db are working.
Any idea what would cause it? I'm running it on windows, set my extension directory and uncommented out extension=php_mysql.dll in the php.ini.
Apache 2.0.63
PHP 5.2
-
$p = $_REQUEST['p']; if($p == 'accommodation') include ("accommodation.php"); else if($p == 'prices') include ("accommodation.php"); else include ("404.php");
-
I still haven't switched to Vista. I use about 15 programs, and so long as most of them continue to work, it doesn't make sense to switch to a slower, buggier, OS.
-
I use XP 64 and plan of staying with it as long as I can.
-
?
But I wrote it myself, unless I'm the top of the pyramid?
I just really want to get more people on the system - we don't have a bad customer base right now, but after costs we aren't making that much.
-
No ideas? The system took almost a year to make, I just hate that we get out sold by companies with a worse product but 5 sales guys...
-
Just cheat and use the one I wrote two years ago. Say it is awesome because anyone can change the colors without editing the fla file.
Get it at osflv.com
-
WinRar can, but 99% of the time you get an ISO it needs mounted, just like a girlfriend or a horse.
-
I have an obituary system that can hook into any website with an external script include, it also has a funeral planning form and a contact form. It's used by like 250 funeral homes right now, but so far my company has generally been sticking it on sites we've done.
I was thinking about either offering it to existing web designers - it's only for funeral websites, but anyone who knows html web design can use it, and the prices on funeral home websites tend to be higher than most other fields.
I was thinking:
- Webdesigner calls funeral home, shows examples of their work and my system, gets a sale.
- Webdesigner get sale and upfront payment, I create the account, they install it on the new site.
- They either pay for a membership to the obituary system, or they leave that up to the funeral home (it works either way, membership unlocks some features)
- Webdesigner gets their money for the site. They are happy they didn't have to code/pay for an obituary system and forms -- I'm happy because another person has the obituary system, which makes money off of memberships and advertising.
Here is an example of the system added to a site:
http://steelandwolfe.com/obituaries.htm
What do you guys think of the idea? I thought of tweaking it and putting it on hotscripts, but it isn't really a script, its a hosted solution -- and I need people to offer it, because funeral directors aren't going to be on hotscripts making their own sites.
-
Are you meaning they just need to point their domains to my nameserver?
I have a domain that is pointed to my server right now, that I didn't setup in WHM, that doesn't work for some reason. Do I have to set it up in my DNS server, or should the DNS server just resolve all domains to my main IP?
-
I think I have one, ns1.trenttompkins.com and ns2.trenttompkins.com. They are setup by CPanel / WHM, but they work, because that is what I use for my sites.
I just can't find any information about setting up and managing a DNS. I read the "How DNS servers work" on howstuffworks, but it is all conceptual.
Apache has this record already setup in the httpd.conf:
<VirtualHost *>
ServerName server.trenttompkins.com
DocumentRoot /usr/local/apache/htdocs
ServerAdmin root@server.trenttompkins.com
UserDir disable
</VirtualHost>
So it looks like it is set to turn all requests for unknown domains to that? But the DNS just isn't resolving them?
Any idea how I get in and change the DNS?
-
I want to make a CMS that people can go to and it will set them up a site (ie: mycms.com/tibberous)
But I want people to be able to buy domains and point them to their CMS. How can I setup my server so it handles it dynamically? So someone can go in, enter tibberousawesomesite.com, and my server will point tibberousawesomesite.com to mycms.com/tibberous.
-
Do I setup a virtual host that handles all non-named domains? Or how do I set it up?
My server is running WHM / cpanel, which I think screws up httpd.conf edits...
I have the best idea ever! Variable "contexts"!
in Miscellaneous
Posted
premiso, your way also works, I just think the other way is cleaner.
Contexts could be used for other stuff too. Like $dollar could be referred to in a 'currency' context, that would automatically return '$'.number_format($x, 2);
or maybe a string could be output in an html context, where html_entities are already applied.
Its really just a short version of a function call.