-
Posts
969 -
Joined
-
Last visited
Everything posted by Destramic
-
well this is truely embarrising...i have a insert statement which works within phpmyadmin but when using mysqli_query it returns a error. INSERT INTO users (username, timestamp) VALUES ('test', UTC_TIMESTAMP()) i've been playing about with this for a few hours now ...tried changing the column name (timestamp), adding ` around column names as well as table name. the column exists which is the strangest part, and ive even checked there is no space after the column name in the db. whats going on please?
-
sorry i meant sub-domains...but yeah i think a wildcard is what im gonna need by the looks...and it will be for e-commerce aswell as login. users registers, logs in, buys sells products, money transfers via somewhere like paypal. thank you
-
hey guys im wanting to buy a SSL Certificate for my server, so i can allow a secure connection on sensitive information. now i've been looking at https://www.ssls.com...l-certificates/ and it looks a lot more complicated than i'd imagined. ie. what certificate do i choose?...i know i want it for multi domains so that i can do it for register, login, logout etc. But with so many options its not so clear on which one to choose...i just want a certificate some advise on one to choose would be very helpful. Also any information regarding using it in my php and mysql (tutorial). thanks guys
-
no i need to get one but dont know what type of certificate it is i need to buy from the url i gave above...any advise would be great thanks
-
i did a bit of reading on the openssl_random_pseudo_bytes() which seems just the thing i need thank you. now i've never dealt with ssl before and im about to buy a certificate...but im not sure what certificate i need to buy if anyone can please help? https://www.ssls.com/comodo-ssl-certificates/ now i need a wildcard so i can use the cert on pages such as login and register (dont know what else) but there are so many different name types and different validations...confused! any help would be great thanks guys
-
hey guys, i need a little help on the best way to generate a seo friendly token...at the moment i use password_hash() with a peice of users information to create a key so that the user can verifiy account by a url sent via email. now the problem i'm having with that is it contains forward slashes which is killer for my uri and not to mention all the other seo friendly characters it conatins. how do i make the hash url friendly?...any advise would be great thank you
-
some great advise there Jacques...thank you...i'll be sure to use these methods in my build
-
works great thank you requinix
-
hey guys im trying to match a certain string with possible matchs like: :action(activation-key|activation_key2|activation_key3) ...etc :action(activation-key|activation_key2) :action(activation-key) (activation-key) ...etc unfortunatley im not getting the results im after and am now scratching my head. here is my code: $text = ":action(activation-key|activation_key2|activation_key3)"; if (preg_match_all('/<parameter>(.*?)\((.*?)|(.*?)\||\|(.*?)\)$/', $text, $match)) { print_r($match); } my result: a result like this is what im after if anyone could help please: thank you guys
-
Well the only way I can think of validating account other than link is for them to fill out a form so the user can enter the code. Thank you for the link...had some great information on it...but I got a little confused on how it's best to generate a action request For instance you said using a uri like user/123/delete would be a bad way, which I agree...but what would be the best way to get around this? user/delete would be great but how to reference the id across? Thanks for your help
-
yeah i did read up about how complex email address' are...although there are characters that as url unfriendly, mostly all email accounts only allow you to use a certian few characters which are url friendly. but i think i'll go with a user id instead. by the way i use urls to trigger actions?...well when a certian url is requested it will load the controller and action to it passing parameters which in this case is email address and activation key....what is it im doing wrong please? thank you
-
hey guys im after a bit of advise on routing within my framework please. now i've created a route: which will be then interpurated into now my question is having a email address in a url is good idea? if so i can decode the :email_addres parameter in the route like so: $router->add_route('account/verify/email-address/:email_address/activation-key/:activation_key', array('controller' => 'users', 'action' => 'activate_account', 'decode' => 'email_addres' => 'string_to_email') )); would like your thoughts on this please guys (go easy)...if not a user_id would be sufficient i suppose thanks
-
worked great thank you
-
Is there a way of accomplishing what I need in a rewrite?
-
this is what im using...is there a way of doing things better here to get $_GET as it should be? Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?uri=$1 [PT,L] thanks
-
hey guys im having a bit of trouble getting $_GET in my framework. now the ony way to get query from a url such as: i have to use $_SERVER['REQUEST_URI'] unless im doing something wrong? by doing this: print_r($_GET); all i get is : just concerned im doing something wrong?...any advise on this please guys. was thinking of doing something like this in my request public function get_query($name = null) { $uri = $_SERVER['REQUEST_URI']; if (parse_url($uri, PHP_URL_QUERY)) { $query = explode("?", $uri); $query = explode("&", $query[1]); $array = array(); foreach ($query as $string) { $string = explode("=", $string); $query_name = $string[0]; $query_value = $string[1]; $array[$query_name] = $query_value; // $_GET[$query_name] = $query_value; possibly? } if ($name !== null && array_key_exists($name, $array)) { return $array[$name]; } return $array; } return null; } thanks
-
hey guys trying to think of a practical way for a user to select his/her timezone without having to listing all in a select element like so: Europe/London, Europe/Luxembourg, Asia/Singapore etc... i was thinking of having a select element listing +00:00, +01:00 etc... but i would have the problem of DST when clocks change what is the best solution for this please? thank you
-
well my approach was to stop people accessing the page the json data is on unless it is a actual json request...was gonna put a script also which ensures the data is only gathered from my domain so its not local
-
hey guys im tring to look for a good way of finding out if a ajax request is being performed on my page...now ive had a look about and found these two snippets. Both seems to work fine...any suggestions on what one is best to use or even if there is a better way to do this would be helpful...thank you if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === "xmlhttprequest") { // is ajax } if (strpos($_SERVER['HTTP_ACCEPT'], 'application/json') !== false){ // is ajax }
-
hey guys i have like 4 spans which show at the bottom right hand side of my page which are currently overlapping...i've tried to display as block but no success. any help would be greatful...thank you live demo: http://jsfiddle.net/sr5fta4m/ here is my code: .notification { padding: 15px; margin-bottom: 20px; border: 1px solid #eed3d7; border-radius: 4px; position: absolute; bottom: 0px; right: 21px; float: right; clear: right; diplay: block; } #alert-notification { color: white; background-color: #DA4453; } #success-notification { color: white; background-color: #37BC9B; } #information-notification { color: white; background-color: #4A89DC; } #error-notification { color: white; background-color: #DA4453; } <span class="notification" id="success-notification">Registration complete. Please check your mail.</span> <span class="notification" id="alert-notification">Account already activated.</span> <span class="notification" id="information-notification">Please check you email.</span> <span class="notification" id="error-notification">Wrong login detials.</span>
-
thank you for your post i got what i was after using if ($_SERVER['SERVER_NAME'] === parse_url($url, PHP_URL_HOST ) ) { return true; } thank you again
-
hey guys im interested in the jquery notification scripts...where a user registers and then gets redirected to homepage where a notification pops up saying "thank you for registering". now ive looked at a few examples online but im clueless to how each individiual notification pops up is it activated by the refering url? would be good to know...but thats the only way to me that makes sense on how it works. thank you
-
hey guys im making a script where the user gets redirected...but im wanting to make sure the redirection is within the same domain and not being shipped off to another site when using ($_SERVER['HTTP_REFERER']) now what im using seems to do the trick but im wondering if there is a better method of doing this?...i dont want to use regex either thank you guys <?php $match = strpos("http://127.0.0.1/login", $_SERVER['SERVER_NAME']); if ($match && $match > 0 || $match === 0) { echo "domain match"; } ?>