Go Back   CodingForums.com > Search Forums

Before you post, read our: Rules & Posting Guidelines

Showing results 1 to 25 of 54
Search took 0.24 seconds.
Search: Posts Made By: johnnnn
Forum: PHP 08-11-2010, 02:11 PM
Replies: 2
Views: 828
Posted By johnnnn
Lightbulb Ehh, kinda sort of :P What I posted before was...

Ehh, kinda sort of :P What I posted before was just a quick checklist -- I just wanted opinions on the database login system, this post focuses on that, with a little more detail. :P

And yeah,...
Forum: PHP 08-11-2010, 01:14 AM
Replies: 2
Views: 828
Posted By johnnnn
Question Secure login method?

For my CMS, I decided to use a DB login system.

So far, I have come up with this concept:


Create a function that grabs the encrypted login info stored in the database, by login id, returns...
Forum: PHP 08-09-2010, 07:31 PM
Replies: 5
Views: 2,031
Posted By johnnnn
Try this: ## Not tested, this is just off...

Try this:


## Not tested, this is just off the top of my head, but should work.
function validate_mail($useremail) {
if(!isset($useremail) || empty($useremail) || $useremail == null) return...
Forum: PHP 08-09-2010, 07:25 PM
Replies: 23
Views: 33,341
Posted By johnnnn
Jem is a self-proclaimed l33t PHP ninja, and she...

Jem is a self-proclaimed l33t PHP ninja, and she knows what she's talking about. :P

Keep an eye on her website, she's very helpful on the subject and has many posts concerning it.

My list:
...
Forum: PHP 08-09-2010, 04:47 PM
Replies: 1
Views: 1,239
Posted By johnnnn
Question PHP Database login system questions

I haven't really ever used a DB login system, usually I use sessions/cookies. I have a few questions, though:

1. How would I go about doing this? Would I just write a function to run a check on...
Forum: PHP 08-09-2010, 01:30 PM
Replies: 3
Views: 2,196
Posted By johnnnn
Smile Yeah, that just came to mind about the .htaccess...

Yeah, that just came to mind about the .htaccess not working outside of the root directory. I could simply just place the .htaccess in the /admin folder since Apache can deny reading files that begin...
Forum: PHP 08-09-2010, 01:49 AM
Replies: 3
Views: 2,196
Posted By johnnnn
Exclamation Best admin panel security for CMS?

I'm currently making a check list of ALL possible security checks I can use for writing my own custom CMS. As far as the control panel/admin panel goes, I've been speculating the following to provide...
Forum: PHP 07-06-2010, 02:03 AM
Replies: 3
Views: 837
Posted By johnnnn
The echo()ed stuff is single quoted; while the...

The echo()ed stuff is single quoted; while the content inside is wrapped in double quotes, the single quotes don't treat $'s like a variable.

Try this:



echo 'Username: <b><a href="#"...
Forum: PHP 07-06-2010, 01:52 AM
Replies: 2
Views: 1,030
Posted By johnnnn
What is your error_reporting() set to? It might...

What is your error_reporting() set to? It might be caused by unquoted array elements: $somearray[notagoodwaytofetchavalue]. Array elements should be quotes, as PHP will treat unquoted array keys as...
Forum: PHP 07-06-2010, 01:48 AM
Replies: 18
Views: 1,593
Posted By johnnnn
Try this: function cleanse($str) { return...

Try this:

function cleanse($str) {
return trim(strip_tags(htmlentities($str)));
}

$inputvar = cleanse($_POST['SOME_FORM_INPUT_NAME']);
Forum: PHP 07-06-2010, 01:40 AM
Replies: 1
Views: 1,019
Posted By johnnnn
Question Wordpress bug? What do you think?

I've notice in the most recent version of WordPress, if JavaScript is NOT enabled, and you use hand-coded HTML in your WP entries, WP inserts the content into the database. That's all well and good,...
Forum: JavaScript programming 07-05-2010, 01:55 PM
Replies: 2
Views: 1,347
Posted By johnnnn
'cmnd' is the actual command to be passed to...

'cmnd' is the actual command to be passed to execCommand through the xC() function


// Let's focus on our iframe

<p><span style="font-weight:bold;" onclick="xC('editor', 'bold',...
Forum: JavaScript programming 07-04-2010, 09:05 PM
Replies: 2
Views: 1,347
Posted By johnnnn
Exclamation execCommand not working in IE, fine in FF.

I'm (experimenting) writing my own RTE in JavaScript, I'm doing pretty good until it comes to the commands, the execCommand method. Here's what I have so far:


function get(editid) {
// IE...
Forum: PHP 06-07-2010, 07:16 PM
Replies: 7
Views: 1,088
Posted By johnnnn
Question Password storage

Just out of curiousity, which is safer: storing hashed/encrypted passwords in a database of txt file?

I've been looking into writing a flat file script, alternatively, I was wondering if it would...
Forum: PHP 05-22-2010, 07:52 PM
Replies: 2
Views: 764
Posted By johnnnn
Thank you, this answered my question!

Thank you, this answered my question!
Forum: PHP 05-22-2010, 03:31 PM
Replies: 2
Views: 764
Posted By johnnnn
Exclamation Quick output buffering question.

According to the PHP manual, 'While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer.'

To my knowledge, I'm...
Forum: PHP 05-06-2010, 12:02 AM
Replies: 11
Views: 43,276
Posted By johnnnn
Additionally, I'd create a function to 'clean'...

Additionally, I'd create a function to 'clean' array elements. For example, in the case $_SERVER['PHP_SELF'] could be changed, when the form is submitted, it could lead to a malicious page.

Try...
Forum: PHP 05-05-2010, 12:06 AM
Replies: 15
Views: 6,945
Posted By johnnnn
Thanks for the replies. I think I'm all clear...

Thanks for the replies.
I think I'm all clear on this now!
:)
Forum: PHP 05-03-2010, 03:36 PM
Replies: 15
Views: 6,945
Posted By johnnnn
Question PHP: return vs exit

In the manual, if return; is called globally, it immediately end script execution. To my knowlege, exit() and die() will do this too. Is there any difference in return vs exit()?

Thanks!
Forum: PHP 04-23-2010, 12:14 AM
Replies: 2
Views: 2,659
Posted By johnnnn
Exclamation PHP split CSV line, regex

I'm trying to read data from a CSV, and need to know a regular expression to split the line:

Here's what I have so far, but it doesn't work:

$pattern = '/(,(?: ))/';
$line =...
Forum: PHP 04-16-2010, 12:46 AM
Replies: 2
Views: 1,031
Posted By johnnnn
Question Quick PHP regex question!

I'm using the following snippet as an example from the manual:


preg_match('@^(?:http://)?([^/]+)@i',
"http://www.php.net/index.html", $matches);


My question is, what does the ?: before...
Forum: PHP 03-01-2010, 04:50 PM
Replies: 2
Views: 1,193
Posted By johnnnn
Here's how my file will look: ...

Here's how my file will look:

1|John|Photoshop,Illustrator
2|Katie|Coding,PHP,CSS,HTML
3|Adam|Illustration
4|Carly|Developer
Forum: PHP 02-28-2010, 04:20 PM
Replies: 2
Views: 1,193
Posted By johnnnn
Question Flat file database input cleansing...

I'm working on a small project. It uses flat files, not MySQL. I know that anything being recorded to the database should be checked and cleaned.

I'm just wondering, should I use the following...
Forum: PHP 02-18-2010, 02:07 AM
Replies: 5
Views: 1,618
Posted By johnnnn
You could add the additional argument to the...

You could add the additional argument to the strip_tags() function.

The second (optional) argument is a list of tags you allow in the string.

For example, I'm posting a new blog entry, and want...
Forum: MySQL 02-18-2010, 01:59 AM
Replies: 3
Views: 4,570
Posted By johnnnn
Exclamation Is SQL DATETIME() AND NOW() equivalent to PHP's time() function?

When logging information in to a database, many times, one will want to add a date for reference.

From what I understand, the MySQL DATETIME() function will return a date current to where your...
Showing results 1 to 25 of 54

 
Forum Jump

All times are GMT +1. The time now is 07:55 PM.