Jump to content

Destramic

Members
  • Content count

    909
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Destramic

  • Rank
    Prolific Member
  • Birthday 10/06/1986

Profile Information

  • Gender
    Male
  • Location
    United Kingdom

Contact Methods

  • Skype
    destramic
  1. you need a trigger $(document).ready(function() { $('.trigger').click(function(){ $('input.player_search').typeahead({ name: 'player_name', remote: 'mysql.php?query=%QUERY', }); }); }) // the html trigger <button class="trigger">Search</button> i see some big security risks with your php also...your database is open to sql injection, you need to get that sorted before putting your script live. http://php.net/manual/en/mysqli.real-escape-string.php if you used PDO instead of mysqli you probably wouldnt have this problem.
  2. Destramic

    Invalid numeric literal

    Thank you for your help...changing the int to string work perfectly
  3. Destramic

    Invalid numeric literal

    hey guys im tyring to pass a integer to a method and i get this error: when using this code $this->get_model('contract:contracts')->send_verification_pin(070000000000); i could use quotes like so $this->get_model('contract:contracts')->send_verification_pin('070000000000'); but then the integer has the 0 missing at the beginning...this is my debug int(7000000000) /^07\d{9}$/ ["Phone Number: Invalid phone number."] where is this missing 0 please guys? thank you
  4. Destramic

    if row exists update else insert

    i wouldnt of thought of that...thank you barand for your time and effort
  5. Destramic

    if row exists update else insert

    well the tablet would't have a verfication pin...but i planned on having 1 table ie. network_contracts to hoild users contratcs such as sim only, mobile and tablet. the verification pin is for when a user adds sim only / mobile, a pin is then sent to users phone number which needs to be verified.
  6. Destramic

    if row exists update else insert

    hey guys im wanting to check if a row exists then update, else insert. i've been trying to get this query to work, but i'm not having much luck...i know some of you will say to use ON DUPLICATE KEY and make column phone_number primary key but that won't work as contract type column could be TABLET which has no phone number. IF EXISTS (SELECT network_contract_id FROM network_contracts WHERE phone_number = 123456 AND user_id = 1) UPDATE network_contracts SET verification_pin = 9891 WHERE user_id = 1 ELSE INSERT INTO network_contracts(user_id, phone_number, contract_type, verification_pin) VALUES (1, 123456, 'Sim Only', 7676) any help/advise would be greatly appreciated. thank you guys
  7. Destramic

    sending sms

    thank you kicken for the useful information...i've look into purchasing a GSM Router and hopefully will go ahead with setting up my own gateway, but firstly i need to speak with the mobile network providers in the UK to ensure i'm not breaking any the T&C's by doing this. seems like a simple process to set up the hardware, also i see some scripts online that can process the AT commands to the com device....not sure if this is any good though. https://drive.google.com/file/d/0B0NgcxAkZSCHS2MzUEtQMWZYWUc0QmF0RzNBMUItck8wZUtR/edit thanks again
  8. Destramic

    sending sms

    hey guys, im wanting to send sms via php, but have no real know how or experience with it....and don't want to be throw my money into the wrong places. i see there is a lot of companies out there where i can buy text bundles from and then use thier api to send an sms, which is great...but is there a way to cut the middle man out? if not could someone recommend me a company? thank you
  9. Destramic

    php insert linked id with table

    Oh also Cross Site Scripting Attacks...hackers will have a field day on your server
  10. Destramic

    php insert linked id with table

    You need to check $_GET['id'] exists...also your code is vulnerable to Cross-Site Request Forgery Atacks (CSRF) and SQL Injection I'd suggest to use PHP PDO instead of the mysqli extension.
  11. why would you want store html in a database? what you need to do it store necessary data, such as article name, article, user_id, timestamp etc. what parts are you struggling with so we can help you further?...creating a database table...using PDO?
  12. what i also i should of mentioned is that you need to escape all user data using mysqli_escape_string() failure to do so can result in SQL injection $username = mysql_escape_string($_POST['username']); this wouldn't be a problem if you used PDO and prepared queries.
  13. seriously?...i just gave you the documentation referring to mysqli_query as well as the code for your first mysql insert $data = mysqli_query ($query)or die(mysqli_error()); should be $data = mysqli_query($con, $query) or die(mysqli_error($con)); i'm more than sure you can work out the other...if not, give up but i would suggest to use PDO http://php.net/manual/en/book.pdo.php
  14. mysqli_query($con, $query); as seen here http://php.net/manual/en/mysqli.query.php
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.