Hi! Please little help: 1 form/1cell - more results!

This is where you share YOUR scripts with others

Moderators: macek, egami, gesf

Lubaka
New php-forum User
New php-forum User
Posts: 1
Joined: Fri May 18, 2012 2:45 am

Hi! Please little help: 1 form/1cell - more results!

Postby Lubaka » Fri May 18, 2012 3:14 am

Hi! I am new in programming in php, and may I receive a little help?

1. I create a form with one cell and submit button:

function INSERT_Names()
{
echo "<form action="index.php" method="POST">";
echo "<input type="text" name="name1">";
echo "<input type="submit" value="Въведи!">";
echo "</form>";
}

2. I have 4 variables
$name1;
$name2;
$name3;
$name4;

The goal is to appoint a different text value to each variable!

I tried with construction "of-else", but all variables got same value!
I tried with construction "case", but I had same result!

I know that my syntax is wrong, but I don't know how to change it!

tiger
New php-forum User
New php-forum User
Posts: 16
Joined: Thu Jun 23, 2011 9:28 pm

Re: Hi! Please little help: 1 form/1cell - more results!

Postby tiger » Sat May 26, 2012 8:53 am

The goal is to appoint a different text value to each variable!


If I understood you correctly, this should be like this.

Code: Select all

$name1 = "Value1";
$name2 = "Value2";
$name3 = "Value3";
$name4 = "Value4";



Is that what you mean?


Return to “Your Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest

cron