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

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.