Problem retrieving and displaying whitespaces in php myql

Problem retrieving and displaying whitespaces in php myql

am 30.12.2006 23:48:55 von chrisollar

I've got two files.
start.php and finish.php

when I query the mysql database the combo box displays great. But when
I try to pass the information on to the next page I only get the first
word of the field if there are more than one words.
I'm sure that it's something to do with the white spaces. I'm hoping to
find some simple yet elegant help.

Here's start.php



Radiator Part Number Search


Start by selecting your Make and then clicking "Submit"




mysql_connect("localhost", "login", "password") or die(mysql_error());
//echo "Connected to MySQL
";

mysql_select_db("fotechtx_radiator") or die(mysql_error());
//echo "Connected to Radiator Database";

$query="SELECT DISTINCT make FROM radiator ORDER BY make ASC";


$result = mysql_query ($query);
echo "
";

echo "Make
";
echo "";

echo "

";
echo "

";
echo "
";


?>
















And here is finish.php:



Radiator Part Number Search


Now Select your Model and press Submit



// echo "

Make: " . $_POST['carmake']."

\n";
//echo "

listbox: " . $_POST['listbox'] . "

\n";
$make_value = $_POST["carmake"];
echo "$make_value";
//echo "$make_value ";
//foreach ($values as $a){
// echo $a;
//}
//echo "

\n";
?>

//echo "$make_value ";
mysql_connect("localhost", "login", "password") or die(mysql_error());
//echo "Connected to MySQL
";

mysql_select_db("fotechtx_radiator") or die(mysql_error());
//echo "Connected to Radiator Database";

$query="SELECT DISTINCT HEADING FROM radiator WHERE MAKE= '$make_value'
ORDER BY HEADING";

$result = mysql_query ($query);
echo "
";

echo "Make
";
echo "";

echo "
";
echo "
";
echo "
";

echo "Model
";
echo "";
echo "

";
echo "

";
echo "
"
?>





I greatly appreciste any help.
Chris

Re: Problem retrieving and displaying whitespaces in php myql

am 31.12.2006 07:16:48 von Shion

chrisollar wrote:
> I've got two files.
> start.php and finish.php
>
> when I query the mysql database the combo box displays great. But when
> I try to pass the information on to the next page I only get the first
> word of the field if there are more than one words.
> I'm sure that it's something to do with the white spaces. I'm hoping to
> find some simple yet elegant help.
>
> Here's start.php
>
>
>
> Radiator Part Number Search
>
>
>

Start by selecting your Make and then clicking "Submit"


>
>
> > mysql_connect("localhost", "login", "password") or die(mysql_error());
> //echo "Connected to MySQL
";
>
> mysql_select_db("fotechtx_radiator") or die(mysql_error());
> //echo "Connected to Radiator Database";
>
> $query="SELECT DISTINCT make FROM radiator ORDER BY make ASC";
>
>
> $result = mysql_query ($query);
> echo "
";
>
> echo "Make
";
> echo "";
>
> echo "

";
> echo "
>

";
> echo "
";
>
>
> ?>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> And here is finish.php:
>
>
>
> Radiator Part Number Search
>
>
>

Now Select your Model and press Submit


>
> > // echo "

Make: " . $_POST['carmake']."

\n";
> //echo "

listbox: " . $_POST['listbox'] . "

\n";
> $make_value = $_POST["carmake"];
> echo "$make_value";
> //echo "$make_value ";
> //foreach ($values as $a){
> // echo $a;
> //}
> //echo "

\n";
> ?>
>
> > //echo "$make_value ";
> mysql_connect("localhost", "login", "password") or die(mysql_error());
> //echo "Connected to MySQL
";
>
> mysql_select_db("fotechtx_radiator") or die(mysql_error());
> //echo "Connected to Radiator Database";
>
> $query="SELECT DISTINCT HEADING FROM radiator WHERE MAKE= '$make_value'
> ORDER BY HEADING";
>
> $result = mysql_query ($query);
> echo "
";
>
> echo "Make
";
> echo "";
>
> echo "
";
> echo "
";
> echo "
";
>
> echo "Model
";
> echo "Make Selected";
echo "";
echo "";
echo "


A whitespace is used in HTML to separate arguments

example:

This makes the value to be 'Hello' and you will have two unknown arguments,
'Big' and 'John'



Here the value will be 'Hello Big John'.

Why not use single quotes and don't have to use the backslash? There are
browsers that have major problems with single quotes, even if single quotes
are allowed in HTML.

--

//Aho

Re: Problem retrieving and displaying whitespaces in php myql

am 31.12.2006 19:44:11 von chrisollar

Thanks for the help.
I checked it out and it worked great as you already knew.
I'm an industrial programmer turned web guy. The syntax always gets me.
Again, thanks for the assist.
chris

J.O. Aho wrote:
> chrisollar wrote:
> > I've got two files.
> > start.php and finish.php
> >
> > when I query the mysql database the combo box displays great. But when
> > I try to pass the information on to the next page I only get the first
> > word of the field if there are more than one words.
> > I'm sure that it's something to do with the white spaces. I'm hoping to
> > find some simple yet elegant help.
> >
> > Here's start.php
> >
> >
> >
> > Radiator Part Number Search
> >
> >
> >

Start by selecting your Make and then clicking "Submit"


> >
> >
> > > > mysql_connect("localhost", "login", "password") or die(mysql_error());
> > //echo "Connected to MySQL
";
> >
> > mysql_select_db("fotechtx_radiator") or die(mysql_error());
> > //echo "Connected to Radiator Database";
> >
> > $query="SELECT DISTINCT make FROM radiator ORDER BY make ASC";
> >
> >
> > $result = mysql_query ($query);
> > echo "";
> >
> > echo "Make
";
> > echo "";
> >
> > echo "

";
> > echo "
> >

";
> > echo "";
> >
> >
> > ?>
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > And here is finish.php:
> >
> >
> >
> > Radiator Part Number Search
> >
> >
> >

Now Select your Model and press Submit


> >
> > > > // echo "

Make: " . $_POST['carmake']."

\n";
> > //echo "

listbox: " . $_POST['listbox'] . "

\n";
> > $make_value = $_POST["carmake"];
> > echo "$make_value";
> > //echo "$make_value ";
> > //foreach ($values as $a){
> > // echo $a;
> > //}
> > //echo "

\n";
> > ?>
> >
> > > > //echo "$make_value ";
> > mysql_connect("localhost", "login", "password") or die(mysql_error());
> > //echo "Connected to MySQL
";
> >
> > mysql_select_db("fotechtx_radiator") or die(mysql_error());
> > //echo "Connected to Radiator Database";
> >
> > $query="SELECT DISTINCT HEADING FROM radiator WHERE MAKE= '$make_value'
> > ORDER BY HEADING";
> >
> > $result = mysql_query ($query);
> > echo "
";
> >
> > echo "Make
";
> > echo "";
> >
> > echo "
";
> > echo "
";
> > echo "
";
> >
> > echo "Model
";
> > echo "Make Selected";
> echo "";
> echo "";
> echo "
>
>
> A whitespace is used in HTML to separate arguments
>
> example:
>
> This makes the value to be 'Hello' and you will have two unknown arguments,
> 'Big' and 'John'
>
>
>
> Here the value will be 'Hello Big John'.
>
> Why not use single quotes and don't have to use the backslash? There are
> browsers that have major problems with single quotes, even if single quotes
> are allowed in HTML.
>
> --
>
> //Aho

Re: Problem retrieving and displaying whitespaces in php myql

am 31.12.2006 19:54:09 von Shion

chrisollar wrote:
> Thanks for the help.
> I checked it out and it worked great as you already knew.
> I'm an industrial programmer turned web guy. The syntax always gets me.

I recommend you to use the w3c validator, it will verify your code and tell
you about errors, if you get your code approved, then you know it will work in
most browsers.

http://validator.w3.org/


and if you have css files, then the 23c css validator is a good tool too.

http://jigsaw.w3.org/css-validator/

--

//Aho

Re: Problem retrieving and displaying whitespaces in php myql

am 31.12.2006 23:32:21 von Paul Lautman

chrisollar wrote:
> Thanks for the help.
> I checked it out and it worked great as you already knew.
> I'm an industrial programmer turned web guy. The syntax always gets
> me. Again, thanks for the assist.
> chris
>
Also, please don't top post in the forum.

> J.O. Aho wrote:
>> chrisollar wrote:
>>> I've got two files.
>>> start.php and finish.php
>>>
>>> when I query the mysql database the combo box displays great. But
>>> when I try to pass the information on to the next page I only get
>>> the first word of the field if there are more than one words.
>>> I'm sure that it's something to do with the white spaces. I'm
>>> hoping to find some simple yet elegant help.
>>>
>>> Here's start.php
>>>
>>>
>>>
>>> Radiator Part Number Search
>>>
>>>
>>>

Start by selecting your Make and then clicking "Submit"


>>>
>>>
>>> >>> mysql_connect("localhost", "login", "password") or
>>> die(mysql_error()); //echo "Connected to MySQL
";
>>>
>>> mysql_select_db("fotechtx_radiator") or die(mysql_error());
>>> //echo "Connected to Radiator Database";
>>>
>>> $query="SELECT DISTINCT make FROM radiator ORDER BY make ASC";
>>>
>>>
>>> $result = mysql_query ($query);
>>> echo "";
>>>
>>> echo "Make
";
>>> echo "";
>>>
>>> echo "

";
>>> echo "
>>>

";
>>> echo "";
>>>
>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> And here is finish.php:
>>>
>>>
>>>
>>> Radiator Part Number Search
>>>
>>>
>>>

Now Select your Model and press Submit


>>>
>>> >>> // echo "

Make: " . $_POST['carmake']."

\n";
>>> //echo "

listbox: " . $_POST['listbox'] . "

\n";
>>> $make_value = $_POST["carmake"];
>>> echo "$make_value";
>>> //echo "$make_value ";
>>> //foreach ($values as $a){
>>> // echo $a;
>>> //}
>>> //echo "

\n";
>>>>
>>>
>>> >>> //echo "$make_value ";
>>> mysql_connect("localhost", "login", "password") or
>>> die(mysql_error()); //echo "Connected to MySQL
";
>>>
>>> mysql_select_db("fotechtx_radiator") or die(mysql_error());
>>> //echo "Connected to Radiator Database";
>>>
>>> $query="SELECT DISTINCT HEADING FROM radiator WHERE MAKE=
>>> '$make_value' ORDER BY HEADING";
>>>
>>> $result = mysql_query ($query);
>>> echo "
";
>>>
>>> echo "Make
";
>>> echo "";
>>>
>>> echo "
";
>>> echo "
";
>>> echo "
";
>>>
>>> echo "Model
";
>>> echo "Make Selected";
>> echo "";
>> echo "";
>> echo "
>>
>>
>> A whitespace is used in HTML to separate arguments
>>
>> example:
>>
>> This makes the value to be 'Hello' and you will have two unknown
>> arguments, 'Big' and 'John'
>>
>>
>>
>> Here the value will be 'Hello Big John'.
>>
>> Why not use single quotes and don't have to use the backslash? There
>> are browsers that have major problems with single quotes, even if
>> single quotes are allowed in HTML.
>>
>> --
>>
>> //Aho

Re: Problem retrieving and displaying whitespaces in php myql

am 05.01.2007 21:28:07 von chrisollar

sorry for me being such a newbie... but what is top post?
thanks,
chris

Paul Lautman wrote:
> chrisollar wrote:
> > Thanks for the help.
> > I checked it out and it worked great as you already knew.
> > I'm an industrial programmer turned web guy. The syntax always gets
> > me. Again, thanks for the assist.
> > chris
> >
> Also, please don't top post in the forum.
>
> > J.O. Aho wrote:
> >> chrisollar wrote:
> >>> I've got two files.
> >>> start.php and finish.php
> >>>
> >>> when I query the mysql database the combo box displays great. But
> >>> when I try to pass the information on to the next page I only get
> >>> the first word of the field if there are more than one words.
> >>> I'm sure that it's something to do with the white spaces. I'm
> >>> hoping to find some simple yet elegant help.
> >>>
> >>> Here's start.php
> >>>
> >>>
> >>>
> >>> Radiator Part Number Search
> >>>
> >>>
> >>>

Start by selecting your Make and then clicking "Submit"


> >>>
> >>>
> >>> > >>> mysql_connect("localhost", "login", "password") or
> >>> die(mysql_error()); //echo "Connected to MySQL
";
> >>>
> >>> mysql_select_db("fotechtx_radiator") or die(mysql_error());
> >>> //echo "Connected to Radiator Database";
> >>>
> >>> $query="SELECT DISTINCT make FROM radiator ORDER BY make ASC";
> >>>
> >>>
> >>> $result = mysql_query ($query);
> >>> echo "";
> >>>
> >>> echo "Make
";
> >>> echo "";
> >>>
> >>> echo "

";
> >>> echo "
> >>>

";
> >>> echo "";
> >>>
> >>>
> >>>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> And here is finish.php:
> >>>
> >>>
> >>>
> >>> Radiator Part Number Search
> >>>
> >>>
> >>>

Now Select your Model and press Submit


> >>>
> >>> > >>> // echo "

Make: " . $_POST['carmake']."

\n";
> >>> //echo "

listbox: " . $_POST['listbox'] . "

\n";
> >>> $make_value = $_POST["carmake"];
> >>> echo "$make_value";
> >>> //echo "$make_value ";
> >>> //foreach ($values as $a){
> >>> // echo $a;
> >>> //}
> >>> //echo "

\n";
> >>>>
> >>>
> >>> > >>> //echo "$make_value ";
> >>> mysql_connect("localhost", "login", "password") or
> >>> die(mysql_error()); //echo "Connected to MySQL
";
> >>>
> >>> mysql_select_db("fotechtx_radiator") or die(mysql_error());
> >>> //echo "Connected to Radiator Database";
> >>>
> >>> $query="SELECT DISTINCT HEADING FROM radiator WHERE MAKE=
> >>> '$make_value' ORDER BY HEADING";
> >>>
> >>> $result = mysql_query ($query);
> >>> echo "
";
> >>>
> >>> echo "Make
";
> >>> echo "";
> >>>
> >>> echo "
";
> >>> echo "
";
> >>> echo "
";
> >>>
> >>> echo "Model
";
> >>> echo "Make Selected";
> >> echo "";
> >> echo "";
> >> echo "
> >>
> >>
> >> A whitespace is used in HTML to separate arguments
> >>
> >> example:
> >>
> >> This makes the value to be 'Hello' and you will have two unknown
> >> arguments, 'Big' and 'John'
> >>
> >>
> >>
> >> Here the value will be 'Hello Big John'.
> >>
> >> Why not use single quotes and don't have to use the backslash? There
> >> are browsers that have major problems with single quotes, even if
> >> single quotes are allowed in HTML.
> >>
> >> --
> >>
> >> //Aho

Re: Problem retrieving and displaying whitespaces in php myql

am 05.01.2007 21:38:47 von Shion

chrisollar wrote:
> sorry for me being such a newbie... but what is top post?

Top post is when you write your reply on-top of all the quoted text.

You should write your reply next under the text you are replying to and text
you aren't replying to you remover (no need to duplicate someones mail-footer
or text that is irrelevant to your reply).

If a post you reply to has "minus-minus-space" all alone on a line, then your
news clients should remove that line and all lines under it, but not everyone
uses a good news client.


--

//Aho

Re: Problem retrieving and displaying whitespaces in php myql

am 05.01.2007 22:26:59 von Rik

J.O. Aho wrote:
> If a post you reply to has "minus-minus-space" all alone on a line,
> then your news clients should remove that line and all lines under
> it, but not everyone uses a good news client.

Or googlegroups. Yuck.
For people (forced to..) use Outlook Express I can recommen OEQuotefix.
--
Rik Wasmus