sean commented on a Page, PHP Config Creator  -  Jun 09, 2010

not bad, relatively useful. a couple of recommendations though.

1) why are you putting your variables in quotes? you don't need to.
$host="'.$_POST['dbserver'].'"; should be: $host = $_POST['dbserver'];

2) check out file_put_contents, it'll save you some trouble - http://php.net/manual/en/function.file-put-contents.php

3) since this is primarily targeted towards inexperienced individuals, i'd add some error checking before just throwing and accepting random post data

4) if you use single quotes in your echo statements ( echo statements, that you could easily avoid using at all ), you wont have to escape your html double quotes

rated 4/10 for mediocre. slightly better coding practices and error checking should be implemented ( again, we really need a better rating system )

CrandellWS  -  Sep 21, 2015

I reworked the script and created a gist at https://gist.github.com/CrandellWS/40d3618576bec5d19226

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.