PHPCommunity.org is a gathering place for the PHP community. It is a community site for people to get together and get to know one another. It is about community and friendship. If you consider yourself part of the PHP community, you are encouraged to take part! Join us in #phpc on Freenode IRC for community building!
hi guys, im looking for a PHP function to check that an HTML form component is a valid staff email address. can anybody help me please? thanks alot ross
Posted in email validator by 2f9v0c0bq58u3 on May 10
Hi, have you tried just using the mkdir() command, that always works for me
Posted in PHP exec() doesn't work by 2gbdlz7gbs67o on May 4
I have a login script in php, however if a user sign in it does not show his user name on top (like Welcome user) how can I do it ? The script is as follows: set_name('sign_in'); $this->_need_login = false; $application->output['sub_menu'] = "templates/my_account.html"; } // sign_in function set_previous_page($location) { $this->_previous_page = $location; } function default_action() { $parameters = array(); if(!array_key_exists('HTTP_REFERER', $_SERVER)){ // No Referer, use query string $this->set_previous_page($_SERVER['QUERY_STRING']); } else{ $parameters = explode("?", $_SERVER['HTTP_REFERER']); if(array_key_exists(1,$parameters)){ $this->set_previous_page($parameters[1]); } } $this->set_hidden_params(array( 'action' => 'sign_in', 'page' => 'sign_in', 'previous_page' => $this->_previous_page, )); parent::default_action(); } // default_action function action_sign_in() { $application =& application(); $PHP_SELF = $application->server('PHP_SELF'); $this->set_previous_page($application->input('previous_page')); $this->parse_form(); if (!$this->check_form($application->input())) { $this->prepare_errors(); $this->default_action(); return; } $application->set_cookie('login', $application->input('login'), $this->_sticky_time); $application->set_cookie('password', md5($application->input('password')), $this->_sticky_time); $status = $application->clean_cookie('status', 'urlencode');; // If No previous page is given, take them to employer_home or seeker_home if ($this->_previous_page == '' || strstr($this->_previous_page, 'page=index')||strstr($this->_previous_page, 'page=sign_in')){ $this->_previous_page = "page=${status}_home"; } if ($this->_previous_page){ $this->_previous_page = '?' . $this->_previous_page; } // Redirect them to the page they came from $application->do_redirect($PHP_SELF . $this->_previous_page, $application->text('logging_in')); return; } // action_sign_in function check_form(&$input) { if (!parent::check_form($input)) { return false; } $application =& application(); $sql =& sql(); $prefix = $application->config('cookie_prefix'); $login = $sql->escape_string($input['login']); //echo $login; $sql->query("SELECT id, password, status, timezone, use_dst, language FROM `jb_users` WHERE login = $login LIMIT 1"); //print_r($sql); if ($sql->is_empty()) { $this->generate_error('no_such_user'); return false; } $f = $sql->fetch(); $sql->free_result(); if ($f['password'] != $input['password']) { $this->generate_error('incorrect_password'); return false; } if ($application->input('sticky')) { $this->_sticky_time = time() + 86400 * 365; } $application->set_cookie('id', $f['id'], $this->_sticky_time); $application->set_cookie('status', $f['status'], $this->_sticky_time); $application->set_cookie('timezone', $f['timezone'], $this->_sticky_time); $application->set_cookie('dst', $f['use_dst'], $this->_sticky_time); $application->set_cookie('lang', $f['language'], $this->_sticky_time); return true; } // check_form }; // sign_in ?>
Posted in Login by fueptbvh0d22 on Apr 25
I am looking for a php ready made code. I need to build GUIs for accessing and maintaining SQL data – but with as less php development as possible, since I am not really good in php.. I am looking for a feed GUI that resembles excel – with some table that I can update and submit, and also filter and search… I could use Microsoft access – since there I can build forms and buttons without any code development… but on the other hand I prefer php so that a can have a web client-server application. If there was some generic tool that creates forms of my taste it could help a lot – then I could just modify the code slightly only I have too. Can someone refer me to some tool that does that ? thanks ! dani
Posted in help needed to find proper php generator tool by 2hjo2o8sun0li on Apr 24