how to pass a string ignoring uppercase or smallcase...
Posted: Mon Sep 17, 2007 5:34 am
feyd | Please use
data.php contains:[/syntax]
In my database:
There is nothing wrong with the databse.
I don't know why I can't retrieve the product, I think it doesn't recognize the case of the word "Nike" in the html file, i think after the Nike from GET is passed to $productn, it becomes "nike" instead of "Nike".Am I right? Is there anything wrong?
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
My html file contains:
[syntax="html"]
<html>
..
..
...
<a href="data.php?product=Nike">
..
..
.
.
</html>data.php contains:[/syntax]
Code: Select all
<?php
....
...
....
...
$productn = $_GET['product'];
$result = mysql_query("SELECT * FROM data where product = '" .$productn. "' ");
..
.
.
<td align="left"><b><font size=3>' . $productn['productname'] . '</b></td>
....
?>In my database:
Code: Select all
productname size price
Nike xx xxxThere is nothing wrong with the databse.
I don't know why I can't retrieve the product, I think it doesn't recognize the case of the word "Nike" in the html file, i think after the Nike from GET is passed to $productn, it becomes "nike" instead of "Nike".Am I right? Is there anything wrong?
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]