Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Another easy code with annoying error

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

Barbiegirl

Account Closed
Impact
0
<HTML>

<head>
<title>Astins Beta Site </title>
<style>
body {
color : #DDDDDD;
}
td {
font-size : 12px;
line-height : 15px;
color : #AAAAAA;
}
a {
font-size : 12px;
line-height : 15px;
color : #5555FF;
}
a:hover {
font-size : 12px;
line-height : 15px;
color : #55FF55;
}
</style>
</head>

<!-----highlight selected stuff----->

<script>


function highlight(which,color){
if (document.all||document.getElementById)
which.style.backgroundColor=color
}
</script>

<!----- end highlight---------->



<!-------scroll bar coller----->
<STYLE type="text/css">
<!--
BODY {
scrollbar-face-color: #00FFFF;
scrollbar-arrow-color: #000000;
scrollbar-track-color: #000000;
}
-->
</STYLE>
<!---- scroll bar coler end-->



<body bgColor="#000000" topMargin="0" leftMargin="0">
<table width="700">
<tr><td> <center>



<?php

$username="151296";
$password="********";
$database="151296";

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$pilotname = $_COOKIE['ID_my_site'];

$query = "select ID from users where Name = '$pilotname'";


$result = mysql_query($query);

$num=mysql_numrows($result);

if($num == 1) {
$row = mysql_fetch_assoc($result);
$pilot_id = $row["ID"];
}


//no touchy!!


//what ever field you want to change is Names.

if (isset($_POST[’Name’]) && trim($_POST[’Name’]) != ”) {

$new_wing = $_POST[’Name’];

}

//new wing is just to identify the Name so that when
//you change it below it has an identification



$query = "insert into wings (Name, Commander, Wingmoney) values ('$new_wing', $pilot_id, 1000000)";
$result = mysql_query($insert);


// the end of php

?>


<form action="CreateX.php" method="post">
<table border="0">
<tr><td>Name Of Wing:</td><td>
<input type="text" name="Name" maxlength="10">
</td></tr>

<tr><th colspan=2> <input type="submit" name="submit" value="Create Wing"></th>




</tr> </table>
</form>





</HTML>



































i dont get the problem...........

it was working........ and then randomly stopped

idk what happend
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Change
PHP:
if (isset($_POST[’Name’]) && trim($_POST[’Name’]) != ”) {

$new_wing = $_POST[’Name’];
To
PHP:
if (isset($_POST['Name']) && trim($_POST['Name']) != "") {

$new_wing = $_POST['Name'];

There might be more wrong, but that's what I saw at first. (I don't even know if the code I changed is correct, but the quotes you are using are weird.) I don't know what kind of quotes your using around things, because they show up weird and slanted (and it isn't a `).

Shouldn't error reporting tell you what's wrong with it?
 
0
Close
OMG FIXED!!! thank you so so much ur the BEST!
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back