sKunKbad
Members-
Posts
1,832 -
Joined
-
Last visited
-
Days Won
3
Everything posted by sKunKbad
-
assistance with accessing .htaccess automatically with php
sKunKbad replied to AnthonyArde's topic in PHP Coding Help
Whatever you are trying to access, you might try using the following format for your URLs: http://username:password@hostname/path?arg=value#anchor I haven't tried this, but it's worth a try -
why $matches[1]?, why not $matches
-
Hard to say what is going wrong without seeing more code.
-
Well, so you do have a session array, and it is showing two keys that you must have set at some point. try this: echo '<h1>' . $_SESSION['test'] . '</0>'; You should see a big 0
-
So what happens if you do this: print_r($_SESSION);
-
Are you declaring your variables at the top of your class? Like this: public $fname = '';
-
Post some code so we can see what you are doing.
-
map.setCenter() ? You are setting up your map a lot differently than I did for my store. Take a look and see what I did, and maybe it can help you. www.tv-sewingcenter.com/bigmap.php
-
I've used Kohana and CodeIgniter, and I like CodeIgniter. Docs are awesome, community is active....
-
Use a form token. Generate a random string with php, add this to a hidden form field, and add this also to a session key. When the form is submitted, check the hidden form field against the session key.
-
Just go to tectite.com and use the formmail. Save you some time, and it is really awesome
-
If the client insists, you might have to say, "I told you so" in the end. I set up a webserver at work, just to get a little experience, and it was a great learning experience. I just used an old desktop computer and Ubuntu Server Edition. I ran 5 websites off it for about a year, and as far as I know, I never had a problem. If I had a client that insisted on me buying him/her a server and running a website, I'd do it, but that doesn't mean it would be done right. It also doesn't mean that their data would be safe, but it sounds like your client doesn't really care. Honestly, you might think about getting an old computer, like I did, installing Ubuntu Server Edition, and giving it a try. Ubuntu forums has massive support. You'll need to read a lot to get going, but it's worth the time, and I think you will have fun.
-
[SOLVED] Is php in an external javascript file exposed?
sKunKbad replied to Neomech's topic in PHP Coding Help
This is wrong. "Anyone" can not look at this file. If a hacker wants the file contents, they may be able to see it easier being in a public directory, but for normal users, this file won't display any php. Try it yourself. -
problem passing variable to header("Location:
sKunKbad replied to rmelino's topic in PHP Coding Help
how about: header("Location: buy.php?leadid=$leadid"); -
By an entry being "successfully added", do you mean to a database? If that is the case, simply check to see if the insert was successful. I see no reason to use a redirect at all. Show more code if you need to. This is the way I would do the update, but it is OOP. Adapt as needed <?php if($insert = $this->db->insert($table_name, $data)) { // congradulations, you did it } else { // please try again }
-
on locator.php define something define('AUTH_TOKEN',1); on ims.php check for the defined if(!defined('AUTH_TOKEN')) die('go away');
-
I think a more common way to achieve this would be to have the form post back to the file it resides in. You can check for form submission, validate, and then display your confirmation message/error message all within one file. <?php If($_POST['submit']){ //validate //show confirmation or error } if(!isset($_POST['submit']) OR $error == 1){ //show form }
-
I don't know if you would consider any frameworks like CodeIgniter, but frameworks are designed to do just what you are asking. Will you ever need to use php inside your HTML? If so, a framework, or Smarty might be the way to go.
-
Garethp and micmania1, Thanks for your input. I'm going to have to try php FTP sometime. What Garethp said makes a lot of sense. I hope you can see why I've been nervous about using it. php is great, and if anyone could get it right, it would be php!
-
I've actually never used php's FTP, but I can't imagine it is very reliable. I have the hardest time with FTP reliability with FileZilla or SmartFTP. How could I trust php's FTP? Am I wrong about the reliability?
-
When an upload occurs, you normally change the filename for security reasons, right? So use this file name in a database table, along with the time it was uploaded, and any other details you choose to store. In your admin control panel, have a place where you can review the uploaded files, approve or deny as neccessary. If the file is approved, move it to the approved location.
-
Maybe you should show us the output, because there's no way to know what your talking about without seeing the output.
-
PHP DOM is sweet. I like not having to need regex, and the OOP involved makes things more clear because my brain is in full OOP mode.
-
Problem modifying headers + other strange problems
sKunKbad replied to Koopa's topic in PHP Coding Help
Ok, your problem is the header() that is trying to redirect the user, but after the DOCTYPE is output. The DOCTYPE, and any other output to the browser, needs to be AFTER the header redirect. If you were redirecting, you wouldn't need the DOCTYPE, ya know what I'm saying? This is the modification to the header that php is complaining about. You should store the output in a variable, and echo (if necessary) AFTER all header modification and session start.