Jump to content

[SOLVED] help formatting


cs1h

Recommended Posts

Hi,

 

Thanks for the reply, unfortunatly I don't know how to implement this.

I'm pretty useless at php, is it possible for anyone to help me.

 

My code so far is

<?php 

// Remove spaces form conutry
$targetb = $_POST['menuFilesDMA'];
$targetb = str_replace(' ','_', $targetb);

$targetc = $_POST['menuSubjectsDMA'];
$targetc = str_replace(' ','_', $targetc);

//This gets all the information from the form 
$name=$_POST['name'];
$continent=($targetc);
$country=($targetb);
$town=$_POST['title2']; 
$type=$_POST['Catagory'];
$Email=$_POST['Email']; 
$Title=$_POST['title']; 
$Abstract=$_POST['message']; //<<<<<-----This is the first text field
$Article=$_POST['messagetwo']; //<<<<<-----This is the second text field  

// Connects to the Database 
mysql_connect("localhost", "xxx", "xxxd") or die(mysql_error()) ; 
mysql_select_db("real") or die(mysql_error()) ; 

//Writes the information to the database 
mysql_query($sql = "insert into `items` (`name`, `Continent`, `country`, `town`, `type`, `alltype`, `Email`, `Title`, `Abstract`, `Article`) values ('$name', '$continent', '$country', '$town', '$type', 'all', '$Email', '$Title', '$Abstract', '$Article')"); 

} 
?>

 

I have two text fields that need this fix.

 

If anyone can help it will be very much appriciated.

 

Thanks

Colin

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.