Search found 25 matches

by screevo
Sun Aug 27, 2006 9:26 am
Forum: UI Design/Usability
Topic: ScreevoCMS: A Very Simple Content Management System.
Replies: 4
Views: 4745

feyd wrote:Generally when we talk of UI, the PHP behind it is less of a concern. It's the output that we care about. Normally, that's simply posting an active link; which you did.
I'll edit out the code, and link to the thread containing it.
by screevo
Sun Aug 27, 2006 9:22 am
Forum: PHP - Code
Topic: Best way to import a MySQL Dump file
Replies: 23
Views: 3260

ole wrote:

Code: Select all

exec(sh /path/to/file/script arguments)
Quotes?
Semi-colon?
Backtick?
I've never used the command as it's disabled on my server. The backtick is interesting though. I didn't know about that.

SM
by screevo
Sun Aug 27, 2006 8:50 am
Forum: UI Design/Usability
Topic: ScreevoCMS: A Very Simple Content Management System.
Replies: 4
Views: 4745

Isn't this the same code we're discussing in Code Critique? Why post it again in UI of all places or at all? ... Because one of the mods told me this is where it belongs? http://forums.devnetwork.net/viewtopic.php?p=303359#303359 If I was correct, Code Critique was more oriented to quality of the c...
by screevo
Sun Aug 27, 2006 8:28 am
Forum: PHP - Code
Topic: mail() function sender details
Replies: 3
Views: 757

Please can you give a peice of example code, I am not familiar with using headers. e.g. $headers = "From: Blah Blah <blah@blah.com>\r\n"; $headers = "Reply-To: Tom lansdale <blah@blah.com>\r\n"; mail($to, $subject, $body); I cant seem to get it to work, excuse my ignorance, I am...
by screevo
Sun Aug 27, 2006 7:37 am
Forum: PHP - Code
Topic: mysql_real_escape an entire array and export values.
Replies: 15
Views: 3299

Other than setting any undefineds as null, whats the difference between yours and mine? You do $form as $var, I do $form as $form. I don't notice any difference other than the null thing. I don't understand the difference between not defining $var at all, and defining it as null. So far, mine works ...
by screevo
Sun Aug 27, 2006 7:13 am
Forum: PHP - Code
Topic: mysql_real_escape an entire array and export values.
Replies: 15
Views: 3299

I ended up just doing You have been warned. Yes. And I checked over my code. 1. That variable is always initiated IN a function, so I'm not concerned about overwriting an existing variable. It's at the beginning of a function, and since I don't use globals, it cant overwrite something that doesnt e...
by screevo
Sun Aug 27, 2006 7:08 am
Forum: Job Hunt
Topic: Custom php/mysql script wanted
Replies: 1
Views: 2099

Re: Custom php/mysql script wanted

Hi Guys I need a custom php/mysql script, I am willing to pay a small amount say around £100 for the right script. I have designed the look I need in a web page, so if you view the following code in a web browser, you will get the idea. http://www.kplaylist.net/ That might be very close, if not mor...
by screevo
Sun Aug 27, 2006 7:04 am
Forum: PHP - Code
Topic: Best way to import a MySQL Dump file
Replies: 23
Views: 3260

You know, you might want to have a look at phpMyAdmin and see how they handle their SQL script loads. Hum I tried doing that, but it's like looking at another language - I can't understand it! Thanks for the script, timvw - but I don't see how I can include that into my PHP as it's a bash script? Y...
by screevo
Sun Aug 27, 2006 6:55 am
Forum: PHP - Code
Topic: mysql_real_escape an entire array and export values.
Replies: 15
Views: 3299

That seems pretty nice timvw. yeah. with some 'global' thrown into it might even work :lol: Heh. I figured someone would point that out eventually. I ended up just doing $post=array_map('mysql_real_escape_string',$_POST); extract($post); whenever I needed this function, which I believe was only twi...
by screevo
Sun Aug 27, 2006 3:57 am
Forum: UI Design/Usability
Topic: ScreevoCMS: A Very Simple Content Management System.
Replies: 4
Views: 4745

ScreevoCMS: A Very Simple Content Management System.

So I've developed a content management for myself. But I figure I might lend it to other people. So far, I've designed the administration functions in such a way that make sense to me, but I'm sure a UI designer would cringe. Two live demonstrations are http://www.screevo.com and http://wedding.scre...
by screevo
Sun Aug 27, 2006 2:39 am
Forum: PHP - Code
Topic: Checking if a record exists in a database.
Replies: 13
Views: 4359

Yeah. I got a TON of people telling me I was an idiot for assuming that Magic_quotes was on when i wrote my code (Because it was.) So I definitively turned it off, and did everything with mysql_real_escape_string. Then I got the same people saying how dare I write code without taking into account th...
by screevo
Sat Aug 26, 2006 11:54 pm
Forum: PHP - Code
Topic: mysql_real_escape an entire array and export values.
Replies: 15
Views: 3299

What are some of the bad things that can happen with extract, and how does it differ from me setting those variables manually by doing "$x=$_POST['x']"
by screevo
Sat Aug 26, 2006 10:42 pm
Forum: PHP - Code
Topic: mysql_real_escape an entire array and export values.
Replies: 15
Views: 3299

Well, here's what I'm doing. In the admin panel of this CMS i've written for my website, there are five fields for editing or creating a page. So I know what's in those fields. I put it there myself. Currently, I have to do this: <? $id = mysql_real_escape_string($_POST['id']; $link = mysql_real_esc...
by screevo
Sat Aug 26, 2006 9:35 pm
Forum: PHP - Code
Topic: mysql_real_escape an entire array and export values.
Replies: 15
Views: 3299

mysql_real_escape an entire array and export values.

Ok. Say I have <? $test['a'] = "blah ' blah ' "; $test['b'] = "choo ' choo ' "; ?> and I want to end up with $a="blah \' blah \' "; $b="blah \' blah \' "; Is there a function I can use to escape all the values in the array and export them? In particular, I wan...
by screevo
Sat Aug 26, 2006 6:21 pm
Forum: PHP - Code
Topic: Checking if a record exists in a database.
Replies: 13
Views: 4359

Afaik on duplicate key is a mysql extension too.. (I guess we're forced to vendor specific dialect anyway with sql products...) Hm. Every time I show my code to people, there's always a bunch who maintain that my code should be able to be put on any combination of PHP and a SQL server and work just...