• An script that will show either status from reading the steam ids from a MYSQL Table
    19 replies, posted
I have this MySQL table and it will have peoples steam user names and steam ids here is what the table is in the database i have [url]http://pastebin.com/DhkxLkp7[/url] I want to make a simple script that will show either an image (i provide) saying "you are VIP, blah blah) or another image saying "sign up for vip" but below this, it would give a list of features vips can have. So if their steam id is read in the mysql, list features don't exist. and vise versa (not read mysql, features do exist) Thank You
You want us to do this for you? [editline]17th October 2011[/editline] For free?
It could be a simple script, all it does is read the mysql and perform either 2 functions based on if steam id entry is read
[QUOTE=camcole1;32824096]It could be a simple script, all it does is read the mysql and perform either 2 functions based on if steam id entry is read[/QUOTE] You know, the time it takes for you to request things like this than wait for a reply that is serious (In regards to your "can someone crack this" thread.) you could learn basic PHP + MySQL to do something like this.
If you've come looking for free work then you've come to the wrong place.
[QUOTE=Jelly;32824231]If you've come looking for free work then you've come to the wrong place.[/QUOTE] I am asking those who like to help the community, not the selfish ones (like [I][U][B]YOU[/B][/U][/I]) who are looking for freelance
Well, you wanted a simple script, so have a simple script. I'm not responsible if, for whatever reason, you don't understand it. [PHP]if($donated === 'true') { echo "WOW!"; } else { echo "YOU SHOULD GIVE US YOUR MONEY!!"; }[/PHP] Now please, either go learn how to do this yourself, or realize that most people don't work for free.
[QUOTE=camcole1;32824880]I am asking those who like to help the community, not the selfish ones (like [I][U][B]YOU[/B][/U][/I]) who are looking for freelance[/QUOTE] Well then, shouldn't you be asking the community you're "making" it for?
[QUOTE=camcole1;32824880]I am asking those who like to help the community, not the selfish ones (like [I][U][B]YOU[/B][/U][/I]) who are looking for freelance[/QUOTE] You're coming in asking for one of us to write you a script. [B]WE ARE HERE TO HELP YOU.[/b] Not to do free work, by all means we'll point you in the right direction. [I][U][B]YOU[/B][/U][/I] are being the selfish one by coming in expecting work done by free that would otherwise cost money.
Why on earth are you storing donation status in longtext And why do you need nick for anyways And why isn't steamid set as unique You should learn a bit more about database planning before doing this you know. Regardless, here's SOME help. [code]SELECT donated FROM server_vip WHERE steamid=\"" . mysql_real_escape_string($steamid) . "\";[/code] This will return the value of "donated" field in the server_vip table for the fitting steamid. Oh look, I even added the quotes, how nice of me.
[QUOTE=camcole1;32823433]I have this MySQL table and it will have peoples steam user names and steam ids here is what the table is in the database i have [url]http://pastebin.com/DhkxLkp7[/url] I want to make a simple script that will show either an image (i provide) saying "you are VIP, blah blah) or another image saying "sign up for vip" but below this, it would give a list of features vips can have. So if their steam id is read in the mysql, list features don't exist. and vise versa (not read mysql, features do exist) Thank You[/QUOTE] Facepunch webdev isn't for asking other to do your work. Maybe if you tried we might actually help you, but you haven't even tried and you're asking for help. Also, There is a huge thread for asking for help.
Here we go again...
[QUOTE=camcole1;32824880]I am asking those who like to help the community, not the selfish ones (like [I][U][B]YOU[/B][/U][/I]) who are looking for freelance[/QUOTE] Wanting compensation for time and expertise is not selfish. Wanting things for free is.
[QUOTE=camcole1;32824880]I am asking those who like to help the community, not the selfish ones (like [I][U][B]YOU[/B][/U][/I]) who are looking for freelance[/QUOTE] We'd be doing work for you for free, not helping the community.
Also, why would work anyone for free for you, if you make money out of it?! By the way, helping means that you ask a question and provide your code and the people help you by explaining to you how to do it correctly.
[php]<?php // used for steamid error projection $key = rand() / 6; // connect to mysql $mysql_host = 'ip'; $mysql_user = 'username'; $mysql_password = 'password'; $mysql = mysql_connect($mysql_host, $mysql_user, $mysql_password); if (!$mysql) { die('Failure, could not connect to database: ' . mysql_error()); } // get steamid $steamid = $_POST["steamid"]; $donated = mysql_query("SELECT donated FROM server_vip WHERE steamid='".$steamid."';"); // calculate error if something goes wrong die('Error - value: ' . round(mt_rand(0, 508) / rand(0, 403) * $key)); // continue if nothing wrong if($donated = '1') { echo "Yes."; } else { echo "No."; } ?> <form action="" method="post"> SteamID: <input type="text" name="steamid" /> <input type="submit" />[/php] Figure out the rest and please don't come back here asking for a full blown script for free, we're here to help, not be your personal coding force. You can learn php from these sites, these are just a few which came off the top of my head: [url]http://www.phpbuddy.com/[/url] [url]http://www.nettuts.com/[/url] [url]http://www.sitepoint.com/[/url] (web lessons, paid tutors) [url]http://www.php.net/[/url] (not really tutorials but the official site gives a hell of a lot of info on the functions and errors php can produce) [url]http://google.com/[/url] (searching the problem always tends to pull up an answer)
Eddy, you forgot to DROP TABLE at line 13.
[QUOTE=nikomo;32859274]Eddy, you forgot to DROP TABLE at line 13.[/QUOTE] Oh poop knew I missed something, oh well he can add it himself if he uses it.
Any way of it retrieving the steam id automatically? in-game. from the steam api
[QUOTE=camcole1;32859838]Any way of it retrieving the steam id automatically? in-game. from the steam api[/QUOTE] That's your part to look it up.
Sorry, you need to Log In to post a reply to this thread.