View Single Post
  #16  
Old 05-28-2005, 10:59 PM
General Nuisance is offline General Nuisance
Registered User

Join Date: Oct 2004
Posts: 616

Send a message via ICQ to General Nuisance
does not work for me

this is updateed code:

PHP Code:
 <html><head><title>Add Your Link</title></head>
<body>
<?php

$self 
$_SERVER['PHP_SELF'];
$nn $_POST['nn'];
$url $_POST['url'];
$lname $_POST['lname'];
$sc $_POST['sc'];
?>
<form action="<?php $self ?>" method= "post">
Your Nick Name: <input type="text" name="nn" size="25">
<BR>
Your Websites Catagory: 
  <select size="1" name="sc">
  <option>Please Select</option>
  <option>Delta Force Xtreme Resource</option>
  <option>Joint Operations Escalation Resource</option>
  <option>Joint Operations Resource</option>
  <option>Delta Force Xtreme Squad</option>
  <option>Joint Operations Escalation Squad</option>
  <option>Joint Operations Squad</option>
  </select>
<BR>
Your Websites Name: <input type="text" name="lname" size="80">
<BR>
Your Websites URL: <input type= "text" name="url" size"80">
<BR>
<input type="submit" value="Submit Your Link"> </form>
<BR>

<?php

if( $nn and $url and $lname and $sc # makeing sure fields are filled in
# connecting to Mysql
$conn=@mysql_connect"localhost""my username""my password" ) or die( "err:conn" );

#selecting Database

$rs = @mysql_select_db"linkdb"$conn ) or die( "err:conn" );

#create the query

$sql="insert into links (NN, sc, LName, URL) values ( $NN, \"$sc\", \"$LName\", \"$url\" )";

#execute the query

$rs mysql_query$sql$conn );

#confirm the added link

if($rs){ echo( "The Link $lname was Added To the $sc Database!" ); }
}

?>

</body></html>
PS.

i also tried it exactly the way you did it that did not work either..
__________________
The Nova-Zone


http://youraite.yourhost.yourusername.com - long urls
-looks bad
-who can remember it?
- Solution?
- Get a short Nova-Zone subdomain! Yoursite.nova-zone.com
- Now thats smart. just ask for one via pm,email or contact page on site.
Reply With Quote