Reputation: 170 Stalwart
- Active Members
- Active Posts:
- 605 (0.34 per day)
- 12-October 09
- Profile Views:
- Last Active:
- Aug 20 2014 05:18 AM
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Who Cares
- Favorite Gaming Platform:
- Your Car:
- Dream Kudos:
Posts I've Made
Posted 16 Aug 2014is it? Huh, i've been saying prepared for years.
Posted 16 Aug 2014Firstly you should not use the mysqli or the mysql functions, they are old and not very secure at all.
You should be use Prepared Data Objects (PDO): http://code.tutsplus...cess--net-12059
However, the reason that specific code you posted isn't working is I imagine because you do not have single quotes around the variables in your query. E.g.
VALUES('$bizname', '$address', '$lat', '$long', '$type')
If in doubt with an SQL error, print out the SQL it is trying to run and run it in MySQL Workbench or PHPMyAdmin, or whatever tool you want.
$str = "INSERT INTO markers (name, address, lat, lng, type) VALUES($bizname, $address, $lat, $long, $type)"; echo $str;
Still though, that's a insecure way to do it, and you really should look into that PDO link I gave you.
Posted 12 May 2014I am a web developer, and many a woman would agree I am extremely passionate. I think we could come to some...arrangement.
Posted 12 May 2014The data is defintely not in the database, nor has it ever been according to the various logs, backups, etc...
If there is a bug then it's at the point at which the data is being saved, however on several occasions I've been told that they have checked after saving it and the data defintely had saved, but then when I check the backups and logs, it's nowhere to be found.
Posted 12 May 2014I am taking a week off from computer games. And I mean it this time.
- Member Title:
- D.I.C Addict
- Age Unknown
- Birthday Unknown
- Years Programming:
- Programming Languages: