Hi,
I had a question about converting a field that was inputted in a form to all uppercase.
<form name="email_list" method="post" action="emailme.php">
<input type="text" name="companyname" size=20>
</form>
The next file is emailme.php
<?
$companyname=($_POST['companyname']);
mysql_query("INSERT INTO company UCASE(companyname) VALUES ('$_POST[companyname]')");
?>
I'm trying to get the input from the user to convert to all uppercase so that it saves in the database all caps.
I tried to use UCASE(companyname). But it ignores the UCASE and the text is saved however the user inputs in the field.
?>
If this is not clear please let me know. I'm not sure why it's ignoring the syntax.
I can do this,
$Company=strtoupper($company);
echo $company;
I did that to test the string and it displays all uppercase. But I can't get it to store in the database the same way.
I had a question about converting a field that was inputted in a form to all uppercase.
<form name="email_list" method="post" action="emailme.php">
<input type="text" name="companyname" size=20>
</form>
The next file is emailme.php
<?
$companyname=($_POST['companyname']);
mysql_query("INSERT INTO company UCASE(companyname) VALUES ('$_POST[companyname]')");
?>
I'm trying to get the input from the user to convert to all uppercase so that it saves in the database all caps.
I tried to use UCASE(companyname). But it ignores the UCASE and the text is saved however the user inputs in the field.
?>
If this is not clear please let me know. I'm not sure why it's ignoring the syntax.
I can do this,
$Company=strtoupper($company);
echo $company;
I did that to test the string and it displays all uppercase. But I can't get it to store in the database the same way.