Ask a Question related to PHP Development, Design and Development.
-
anybody #1
php string concat
Hello,
Simple question here....
I am trying to concatenate 2 strings but it doesn't seem to work. My only
experience in in C and VB 6.0.
PHP newbie!
I am getting a value from an option group for the exact shoe size , then
appending it to the form action string, or at least I am trying to.
The form calls a small fx to set a variable - $size - to the assigned
value from document.order_shoe.size.value.
Code:
<form action = "../shop_cart.php?item='.$sansz." name='order_shoe'
method = post onsubmit='return setsize();'>
<br>  Size: 
<select name=size>
<option value="">Select a size</option>
<option value="mhr0109">9</option>
<option value="mhr0110">10</option>
<option value="mhr0111">11</option>
<option value="mhr0112">12</option>
</select>
<p align="left">
  
<input type="submit" value="Add to cart" >
</form>
Thz for the help!
anybody Guest
-
Concat two fields in SQL
I am trying to concatenate two columns in an SQL statement but haven't been having much success: here is the portion of the SQL: ... -
Which version supports concat???
I have a problem with different versions of MySQL supporting concat differently. The portion of the query that uses the concat function looks... -
Concat problem with SQL
hi all I have a problem when I try to concat 2 fields with a dot, in a query (Oracle database). here an example : <query name="myquery"... -
String length/concat problems in Ruby 1.8.0?
Has anyone run into Ruby string length/concatenation problems in Ruby 1.8.0? One of my associates encountered difficulties when storing the... -
HOW CAN I CONCAT TWO LINEAR LISTS
I have two linear lists: temp1 = temp1 = I want to combine them into one list i.e result = -
Max #2
Re: php string concat
To concatenate two strings, use a period, eg:
$completestring = $part1.$part2
Hope this helps.
"anybody" <tk@ev1.net> wrote in message
news:IjNib.569$7a4.523@newsread4.news.pas.earthlin k.net...only> Hello,
>
> Simple question here....
>
> I am trying to concatenate 2 strings but it doesn't seem to work. My> experience in in C and VB 6.0.
>
> PHP newbie!
>
> I am getting a value from an option group for the exact shoe size , then
> appending it to the form action string, or at least I am trying to.
>
> The form calls a small fx to set a variable - $size - to the assigned
> value from document.order_shoe.size.value.
>
>
>
> Code:
>
>
> <form action = "../shop_cart.php?item='.$sansz." name='order_shoe'
> method = post onsubmit='return setsize();'>
>
> <br>  Size: 
>
> <select name=size>
> <option value="">Select a size</option>
> <option value="mhr0109">9</option>
> <option value="mhr0110">10</option>
> <option value="mhr0111">11</option>
> <option value="mhr0112">12</option>
> </select>
> <p align="left">
>   
> <input type="submit" value="Add to cart" >
> </form>
>
>
> Thz for the help!
>
>
Max Guest
-
Tom Thackrey #3
Re: php string concat
On 14-Oct-2003, "anybody" <tk@ev1.net> wrote:
I assume your <form...> is not enclosed in the PHP tags <?php ... ?>. It> I am trying to concatenate 2 strings but it doesn't seem to work. My
> only
> experience in in C and VB 6.0.
>
> PHP newbie!
>
> I am getting a value from an option group for the exact shoe size , then
> appending it to the form action string, or at least I am trying to.
>
> The form calls a small fx to set a variable - $size - to the assigned
> value from document.order_shoe.size.value.
>
>
>
> Code:
>
>
> <form action = "../shop_cart.php?item='.$sansz." name='order_shoe'
> method = post onsubmit='return setsize();'>
>
> <br>  Size: 
>
> <select name=size>
> <option value="">Select a size</option>
> <option value="mhr0109">9</option>
> <option value="mhr0110">10</option>
> <option value="mhr0111">11</option>
> <option value="mhr0112">12</option>
> </select>
> <p align="left">
>   
> <input type="submit" value="Add to cart" >
> </form>
should read
<form action = "../shop_cart.php?item='<? echo $sansz; ?>'
name='order_shoe'
Unless you are inside the PHP tags, you are dealing only with HTML. PHP
simply echos everything in the file unless it's enclosed in the php tags,
then it's interpreted as PHP code.
You also have an HTML error:
<br>  Size: 
The semi-colon is required or the   will not be displayed as a space.
--
Tom Thackrey
[url]www.creative-light.com[/url]
tom (at) creative (dash) light (dot) com
do NOT send email to [email]jamesbutler@willglen.net[/email] (it's reserved for spammers)
Tom Thackrey Guest



Reply With Quote

