Jump to content

[SOLVED] wont add to mysql db


uwannadonkey

Recommended Posts

this wont be added to mysql db

 

 

<?php
include('inc/header.php');
$name=$_post[name];


if(isset($_POST[submit]))
{

//Insert pilots
//setup our query

            $query= 'INSERT INTO clan(name, king, viceking, gold, diamond, crystal) VALUES("' . $name . '", "' . $user->display_name . '", 0, 100, 10, 1)';
$rt=mysql_query($query);
echo"$_POST[name] Clan has been made.";
mysql_query("update `users` SET clan='$name' WHERE ID=$user->ID");
mysql_query("update `users` SET clanrank=127 WHERE ID=$user->ID");
}



if ($user->clanrank == 0)
{
echo ' Join a clan, or create one<br>';


echo 'Create a clan<br>
  <form method=post name=train>
   
   Clan Name:
  <input name=name size=12 maxlength=20>
<br>
  <input type=submit name=submit id=submit value=Create Clan>
';





}
else
{ echo'blah blah';
}





include('inc/footer.php');
?>

 

prolly another careless error?

Link to comment
https://forums.phpfreaks.com/topic/66385-solved-wont-add-to-mysql-db/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.