View Full Version : [HELP]Webclient Maker Script of mine Failed. Help[/HELP] WILLING TO GIVE SCRIPT COPY
cboy676
July 11th, 2010, 18:05
$getServerId = mysql_query('SELECT ip FROM servers WHERE ip="'. $_POST['id'] .'"');
$ServerId = mysql_query('SELECT ip FROM servers WHERE ip="'. $_GET['id'] .'"');
$id=$_GET['id'];
$result= mysql_query('SELECT ip FROM servers WHERE id="'. $_GET['ip'] .'"');
$num=mysql_num_rows($result);
mysql_close();
echo 'Youre server has successfully been added to the database.<br />Go to:<br /> <a href="play.php?server=' . $getServerId . '&type=delta">here</a> to play your server.';
That code works there but the echo shit there dont heres what it dose.
It will goto my localhost(test server) like so localhost/rpwc/play.php?server=Resource Id #&type=delta
The underlined text i want to get rid of so it only goses to there id and dose not add resource id
Webclient Maker Script of mine Failed. WILLING TO GIVE SCRIPT COPY FOR HELP
jamie
July 11th, 2010, 18:06
naah. I acieve more than u again Only the registered members can see the link.
cboy676
July 11th, 2010, 18:11
Lol long time no see man can u help me tho
Justin H
July 11th, 2010, 21:09
$getServerId = mysql_query('SELECT ip FROM servers WHERE ip="'. $_POST['id'] .'"');
$ServerId = mysql_query('SELECT ip FROM servers WHERE ip="'. $_GET['id'] .'"');
$id=$_GET['id'];
$result= mysql_query('SELECT ip FROM servers WHERE id="'. $_GET['ip'] .'"');
$num=mysql_num_rows($result);
mysql_close();
echo 'Youre server has successfully been added to the database.<br />Go to:<br /> <a href="play.php?server=' . $getServerId . '&type=delta">here</a> to play your server.';
That code works there but the echo shit there dont heres what it dose.
It will goto my localhost(test server) like so localhost/rpwc/play.php?server=Resource Id #&type=delta
The underlined text i want to get rid of so it only goses to there id and dose not add resource id
Does your database have anything in the ip row/table? It can't show anything if nothing is in IP where ID equals IP. And why are you using ID to get IP?
This probably wont work, but give it a try:
$servID = $_POST['id'];
$getServerId = mysql_query('SELECT ip FROM servers WHERE ip="$servID"');
$ServerId = mysql_query('SELECT ip FROM servers WHERE ip="'. $_GET['id'] .'"');
$id=$_GET['id'];
$result= mysql_query('SELECT ip FROM servers WHERE id="'. $_GET['ip'] .'"');
$num=mysql_num_rows($result);
mysql_close();
echo 'Your server has successfully been added to the database.<br />Go to:<br /> <a href="play.php?server='. $getServerId .'&type=delta">here</a> to play your server.';
Justin H
July 11th, 2010, 21:10
naah. I acieve more than u again Only the registered members can see the link.
Dude, what exactly makes that site so great? Your using MikeRSWeb, you didn't code one bit of that.
my pker pure
July 11th, 2010, 21:27
This probably wont work, but give it a try:
$servID = $_POST['id'];
$getServerId = mysql_query('SELECT ip FROM servers WHERE ip="$servID"');
$ServerId = mysql_query('SELECT ip FROM servers WHERE ip="'. $_GET['id'] .'"');
$id=$_GET['id'];
$result= mysql_query('SELECT ip FROM servers WHERE id="'. $_GET['ip'] .'"');
$num=mysql_num_rows($result);
mysql_close();
echo 'Your server has successfully been added to the database.<br />Go to:<br /> <a href="play.php?server='. $getServerId .'&type=delta">here</a> to play your server.';
dude all you did was correct his spelling errors ...
my pker pure
July 11th, 2010, 21:36
$servID = $_POST['id'];
$getServerId = mysql_query('SELECT ip FROM servers WHERE ip="$servID"');
$ServerId = mysql_query('SELECT ip FROM servers WHERE ip="'. $_GET['id'] .'"');
$id=$_GET['id'];
$result= mysql_query('SELECT ip FROM servers WHERE id="'. $_GET['ip'] .'"');
$num=mysql_num_rows($result);
mysql_close();
echo'Your server has successfully been added to the database.<br/>Go to:<br/> <a href="play.php?server='. $_GETServerId .'&type=delta">here</a> to play your server.';
Okay try that, then tell me if there's any change. I think that the reason this
echo'Your server has successfully been added to the database.<br/>Go to:<br/> <a href="play.php?server='. $_GETServerId .'&type=delta">here</a> to play your server.';
Wont work is because on the original the $_GETserverid was $getserverid, it's a simple mistake so just tell me if my code works for you.
Justin H
July 11th, 2010, 22:38
dude all you did was correct his spelling errors ...
READ MY POST. I SAID IT WONT WORK, BECAUSE HE NEEDS TO BE MORE CLEAR ON THE DATABASE SIDE OF THE SCRIPT.
$servID = $_POST['id'];
$getServerId = mysql_query('SELECT ip FROM servers WHERE ip="$servID"');
$ServerId = mysql_query('SELECT ip FROM servers WHERE ip="'. $_GET['id'] .'"');
$id=$_GET['id'];
$result= mysql_query('SELECT ip FROM servers WHERE id="'. $_GET['ip'] .'"');
$num=mysql_num_rows($result);
mysql_close();
echo'Your server has successfully been added to the database.<br/>Go to:<br/> <a href="play.php?server='. $_GETServerId .'&type=delta">here</a> to play your server.';
Okay try that, then tell me if there's any change. I think that the reason this
Wont work is because on the original the $_GETserverid was $getserverid, it's a simple mistake so just tell me if my code works for you.
Seriously? That won't work....
Pie`
July 11th, 2010, 23:21
And again, the morons of runelocus overwhelm a thread.
cboy676, you're having this problem because the mysql_query() function returns a MySQL Result, NOT a result set. To fetch actual data from the database you need to pass the MySQL Result on to a function like mysql_fetch_array().
Jp09
July 11th, 2010, 23:22
Gl.. Dont think itll work..but.
Justin H
July 12th, 2010, 01:03
dude all you did was correct his spelling errors ...
$servID = $_POST['id'];
$getServerId = mysql_query('SELECT ip FROM servers WHERE ip="$servID"');
$ServerId = mysql_query('SELECT ip FROM servers WHERE ip="'. $_GET['id'] .'"');
$id=$_GET['id'];
$result= mysql_query('SELECT ip FROM servers WHERE id="'. $_GET['ip'] .'"');
$num=mysql_num_rows($result);
mysql_close();
Okay try that, then tell me if there's any change. I think that the reason this
Wont work is because on the original the $_GETserverid was $getserverid, it's a simple mistake so just tell me if my code works for you.
And again, the morons of runelocus overwhelm a thread.
cboy676, you're having this problem because the mysql_query() function returns a MySQL Result, NOT a result set. To fetch actual data from the database you need to pass the MySQL Result on to a function like mysql_fetch_array().
Haha, morons? Your a fucking dumbass dude.
cboy676
July 12th, 2010, 01:41
Does your database have anything in the ip row/table? It can't show anything if nothing is in IP where ID equals IP. And why are you using ID to get IP?
This probably wont work, but give it a try:
$servID = $_POST['id'];
$getServerId = mysql_query('SELECT ip FROM servers WHERE ip="$servID"');
$ServerId = mysql_query('SELECT ip FROM servers WHERE ip="'. $_GET['id'] .'"');
$id=$_GET['id'];
$result= mysql_query('SELECT ip FROM servers WHERE id="'. $_GET['ip'] .'"');
$num=mysql_num_rows($result);
mysql_close();
echo 'Your server has successfully been added to the database.<br />Go to:<br /> <a href="play.php?server='. $getServerId .'&type=delta">here</a> to play your server.';
Resource Id # shows up in url still
Justin H
July 12th, 2010, 04:30
Your code is very confusing. Your using $_POST['id']; and $_GET['id']; - It's selecting the IP with different variables, etc. Please work on making your code a bit easier to understand, as just about every variable has the word ID in it. If you can make an easier to read code, I could understand what your trying to do a little bit better. And I want to know, why are you getting the IP with three different queries? You only need one, and that would help clean it up a bit.
So try this:
$servID = $_POST['id'];
$getServerId = mysql_query('SELECT ip FROM servers WHERE ip="$servID"');
$get = mysql_fetch_array($getServerId);
$ServerId = mysql_query('SELECT ip FROM servers WHERE ip="'. $_GET['id'] .'"');
$get_serverid = mysql_fetch_array($ServerId);
$id=$_GET['id'];
$result= mysql_query('SELECT ip FROM servers WHERE id="'. $_GET['ip'] .'"');
$num=mysql_num_rows($result);
mysql_close();
echo 'Your server has successfully been added to the database.<br />Go to:<br /> <a href="play.php?server='. $get['ip'] .'&type=delta">here</a> to play your server.';
cboy676
July 12th, 2010, 11:23
Your code is very confusing. Your using $_POST['id']; and $_GET['id']; - It's selecting the IP with different variables, etc. Please work on making your code a bit easier to understand, as just about every variable has the word ID in it. If you can make an easier to read code, I could understand what your trying to do a little bit better. And I want to know, why are you getting the IP with three different queries? You only need one, and that would help clean it up a bit.
So try this:
$servID = $_POST['id'];
$getServerId = mysql_query('SELECT ip FROM servers WHERE ip="$servID"');
$get = mysql_fetch_array($getServerId);
$ServerId = mysql_query('SELECT ip FROM servers WHERE ip="'. $_GET['id'] .'"');
$get_serverid = mysql_fetch_array($ServerId);
$id=$_GET['id'];
$result= mysql_query('SELECT ip FROM servers WHERE id="'. $_GET['ip'] .'"');
$num=mysql_num_rows($result);
mysql_close();
echo 'Your server has successfully been added to the database.<br />Go to:<br /> <a href="play.php?server='. $get['ip'] .'&type=delta">here</a> to play your server.';
Now it dose work a little but it will not show up the id
Justin H
July 12th, 2010, 12:52
Now it dose work a little but it will not show up the id
Did you even bother to read my full post? Please make sure you are extracting the CORRECT information. Where it says:
<a href="play.php?server='. $get['ip'] .'&
$get['ip'] is $get, which tracks back to $getServerId - So, right now, it's displaying the IP in the url. Why? Because of:
$get['ip']
and
$getServerId = mysql_query('SELECT ip FROM servers WHERE ip="$servID"');
Like I said, your code is hard to understand. Your basically selecting the IP 3 different times, which I'm not sure why you are doing that.
cboy676
July 12th, 2010, 13:06
Did you even bother to read my full post? Please make sure you are extracting the CORRECT information. Where it says:
<a href="play.php?server='. $get['ip'] .'&
$get['ip'] is $get, which tracks back to $getServerId - So, right now, it's displaying the IP in the url. Why? Because of:
$get['ip']
and
$getServerId = mysql_query('SELECT ip FROM servers WHERE ip="$servID"');
Like I said, your code is hard to understand. Your basically selecting the IP 3 different times, which I'm not sure why you are doing that.
ip = the server ip
Justin H
July 12th, 2010, 13:15
ip = the server ip
Ok, just tell me what you want the code to do. Basically right now, your code is currently doing this: Getting the server IP. Do you want it to do something else?
cboy676
July 12th, 2010, 13:40
Ok, just tell me what you want the code to do. Basically right now, your code is currently doing this: Getting the server IP. Do you want it to do something else?
I want it to:
Get the server id,
when they click the ahref link it gose to
thewebsite.url/rpwc/play.php?server=theirserverid&type=servertype
cboy676
July 12th, 2010, 13:41
Therefore it should work.
Justin H
July 12th, 2010, 13:56
So the problem is
$getServerId = mysql_query('SELECT ip FROM servers WHERE ip="$servID"');
See where it's saying, SELECT >ip<? Thats the problem. Just change that to ID, and it will give you the id. Do the same for
play.php?server='. $get['ip'] .'
So this code should work:
servID = $_POST['id'];
$getServerId = mysql_query('SELECT id FROM servers WHERE ip="$servID"');
$get = mysql_fetch_array($getServerId);
$ServerId = mysql_query('SELECT ip FROM servers WHERE ip="'. $_GET['id'] .'"');
$get_serverid = mysql_fetch_array($ServerId);
$id=$_GET['id'];
$result= mysql_query('SELECT ip FROM servers WHERE id="'. $_GET['ip'] .'"');
$num=mysql_num_rows($result);
mysql_close();
echo 'Your server has successfully been added to the database.<br />Go to:<br /> <a href="play.php?server='. $get['id'] .'&type=delta">here</a> to play your server.';
cboy676
July 12th, 2010, 14:21
Nope, No server id shows up
Faab234
July 12th, 2010, 14:37
Look at this
$_GET['id']
and this
$_GET['ip']
You said, you used "localhost/rpwc/play.php?server=Resource Id #&type=delta"
But it's "localhost/rpwc/play.php?id=IDHERE&ip=IPHERE"
cboy676
July 12th, 2010, 14:39
Look at this
$_GET['id']
and this
$_GET['ip']
You said, you used "localhost/rpwc/play.php?server=Resource Id #&type=delta"
But it's "localhost/rpwc/play.php?id=IDHERE&ip=IPHERE"
Im lost....
Faab23 do you have teamviewer if so read your pms.
Faab234
July 12th, 2010, 14:41
Im lost....
Faab23 do you have teamviewer if so read your pms.
No, I don't have Teamviewer. But i will make a Script for you.
cboy676
July 12th, 2010, 14:48
No, I don't have Teamviewer. But i will make a Script for you.
dl it
Justin H
July 12th, 2010, 14:54
Dude, why is everything IP?
Here, try this - I forgot to edit out one last ip.
if(isset($_POST['id']))
{
$servID = $_POST['id'];
$getServerId = mysql_query('SELECT id FROM servers WHERE id="$servID"');
$get = mysql_fetch_array($getServerId);
}
else
{
$servID = $_GET['id'];
$getServerId = mysql_query('SELECT id FROM servers WHERE id="$servID"');
$get = mysql_fetch_array($getServerId);
}
$ServerId = mysql_query('SELECT ip FROM servers WHERE ip="'. $_GET['id'] .'"');
$get_serverid = mysql_fetch_array($ServerId);
$id=$_GET['id'];
$result= mysql_query('SELECT ip FROM servers WHERE id="'. $_GET['ip'] .'"');
$num=mysql_num_rows($result);
echo 'Your server has successfully been added to the database.<br />Go to:<br /> <a href="play.php?server='. $get['id'] .'&type=delta">here</a> to play your server.';
Pie`
July 12th, 2010, 17:13
Haha, morons? Your a fucking dumbass dude.
Wait, I'm a fucking dumbass? You clearly don't know who you're talking to.
ps. what I posted is correct if you read the PHP docs on mysql_query() you would know that.
Justin H
July 12th, 2010, 17:17
Wait, I'm a fucking dumbass? You clearly don't know who you're talking to.
ps. what I posted is correct if you read the PHP docs on mysql_query() you would know that.
Did I saying anything about you being correct or not? Nope.
Marc
July 12th, 2010, 17:27
Only the registered members can see the link. Look there. As you can see, mysql_query() cannot be used to return a specific object from a row.
you must use a function like Only the registered members can see the link.
If you asshats were smart at all, you would listen to Pie`. He IS a community member for a reason you know.
Faab234
July 12th, 2010, 17:36
Only the registered members can see the link. Look there. As you can see, mysql_query() cannot be used to return a specific object from a row.
you must use a function like Only the registered members can see the link.
If you asshats were smart at all, you would listen to Pie`. He IS a community member for a reason you know.
"OMG, Marc, I kknuw PEEHPEE, Echo `TextHERe´. Can i get CM?"
Also Pie` is for mie a god in Programming.
Pie`
July 12th, 2010, 18:31
"OMG, Marc, I kknuw PEEHPEE, Echo `TextHERe´. Can i get CM?"
Also Pie` is for mie a god in Programming.
for mie a god? wat.
Faab234
July 12th, 2010, 18:56
for mie a god? wat.
You are good in PHP.
Fellixombc
July 12th, 2010, 18:58
Pie` is smarter then all of us.
landofrsps
December 24th, 2011, 11:04
well u ppl posting but not helping.
Joe
December 24th, 2011, 12:37
closed to reduce gravedig.
Powered by vBulletin® Version 4.1.9 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.