Jump to content

Creating PHP variables with fixed strings


chrisshortys

Recommended Posts

Hi there, I am very new to the world of coding but am slowly creating pages!

 

Now I have been doing work with PHP and mySQL this week and I have a question that I cannot find the answer for(probably because I am searching for the wrong phrase!).

 

What I want to be able to do is to take a piece of information from a html form and convert this into PHP a variable but with a modification. e.g.

 

 

From the html table the data is stored in the html variable "comp"

 

$tablename = $_POST[comp]

 

Now what I actually want the variable to end up as is something like BL_comp or comp_BL

 

How do you place the letters before or after the html/PHP variable?

 

All help would be greatly appreciated!

 

Chris

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.