Jump to content

Button to a page HELP


9homie

Recommended Posts

Hello.

 

I would like to make a button which I have made: echo "<input type=\"submit\" value=\"Battle\" name=\"battle\">\n";

and I want that button to go to the new page with the file name

 

battlesystem.php

 

I have NO idea how to do this.

 

Thank You in advance

9homie

Link to comment
Share on other sites

That is my pages code but if you go onto http://pokemonoracle.web44.net/mapcode.php and look at the error code, that is the error and I don't know how to fix it...

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Map Code</title>
</head>

<body>

<?php 

include("battlesystem.php");

$pokemon = array("Rattata", 
                 "Pidgey" 
                 ); 

$chance = rand(1, 15); 

$pokemon_chance = array_rand($pokemon); 
if(empty($_GET['start'])){
        echo "<a href='".$_SERVER['PHP_SELF']."?start=1'><img src='Maps/Pallet_Town.png' border='0' /></a>";
}
elseif ($chance >=1 && $chance <=6 && $pokemon_chance == "Rattata") 
{ 
echo "<a href='".$_SERVER['PHP_SELF']."?start=1'><img src='Maps/Pallet_Town.png' border='0' /></a>";
/*echo "<img src='Maps/Pallet_Town.png' border='0' />";*/
echo "<br />\n"; 
echo "<br />\n"; 
echo "You just found a Rattata"; 
echo "<br />\n"; 
echo "<img src=\"/Pokemon_Images/Rattata.jpg\" />\n"; 
echo "<br />\n"; 
echo "<br />\n"; 
echo "<input type=\"submit\" value=\"Capture\" name=\"capture\">\n"; 
echo "<form method=\"get\" action=\"battlesystem.php\">\n";
echo "<input type=\"submit\" value=\"Battle\">\n";
echo "</form>\n";

}
elseif ($chance >=6 && $chance <=12 && $pokemon_chance == "Pidgey") { 
echo "<a href='".$_SERVER['PHP_SELF']."?start=1'><img src='Maps/Pallet_Town.png' border='0' /></a>";
/*echo "<img src='Maps/Pallet_Town.png' border='0' />";*/
echo "<br />\n"; 
echo "<br />\n"; 
echo "You just found a Pidgey"; 
echo "<br />\n"; 
echo "<img src=\"/Pokemon_Images/Pidgey.jpg\" />\n"; 
echo "<br />\n"; 
echo "<br />\n"; 
echo "<input type=\"submit\" value=\"Capture\" name=\"capture\">\n"; 
echo "<form method=\"get\" action=\"battlesystem.php\">\n";
echo "<input type=\"submit\" value=\"Battle\">\n";
echo "</form>\n";

} else {
   echo "<a href='".$_SERVER['PHP_SELF']."?start=1'><img src='Maps/Pallet_Town.png' border='0' /></a>";
   /*echo "<img src='Maps/Pallet_Town.png' border='0' />";*/
   echo "<br />\n"; 
   echo "<br />\n"; 
   echo "Sorry, You didn't catch a pokemon! Please click the map to try again!"; 

} 

?>

</body>
</html>

Link to comment
Share on other sites

What do you mean, sorry not the best at these things, so can you put the instructions to do that here please and also is there any web hosting service that has a free web hosting service thing and also it has a paid GOOD one WITH it? That doesn't cose that much?

 

 

Link to comment
Share on other sites

I don't understand the part about "free" and "paid" on the same web host.  You get what you pay for.  Get a job then buy web hosting that won't crap out on you all the time like free web hosting does.

 

And if your free web host has cPanel like it says, there's gotta be a place somewhere to make a database dump.

Link to comment
Share on other sites

Traffic = yes, tons.

 

I am only 12. So not the job idea...

 

I mean like on the 000webhost there is a option to take the free web hosting and then when you want you can upgrade it and start paying for the paid one...

 

Also I can't find the database dumb, will it be in the phpmyadmin?

Link to comment
Share on other sites

Traffic = yes, tons.

 

I am only 12. So not the job idea...

 

I mean like on the 000webhost there is a option to take the free web hosting and then when you want you can upgrade it and start paying for the paid one...

 

Also I can't find the database dumb, will it be in the phpmyadmin?

 

Then go beg your parents for money? ;)  And he's telling you to buy a server.  If you are serious about "tons of traffic", you'll need a real server, which can range from like, $150-$650 a month depending on the quality and host.

 

@Jabop:  Those prices don't seem too bad for a server.  I'm going to read the rest of the site later.  Thanks for the link.

Link to comment
Share on other sites

DarkWater: The prices are amazing, actually

 

I got my server when they were running a deal, the specs are as follows:

 

Intel Xeon 3220-Quad Core @ 2.4GHz

Hynix 1GB DDR2 x 4

Western Digital WD Caviar RE 16 WD2500YS x 2

1000Mbps uplink

 

for $199 a month. It's a bit much for what I realllly need it for, but I like the power.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.