![]() |
make a query with the value of text
hi!
I have problems to give the value of a text. I have in a PHP this: Code:
<?phpCode:
case 'E': Why the result of my query is: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0' at line 1 |
Re: make a query with the value of text
Code: PHP
|
Re: make a query with the value of text
no... not's run.
Is it possible with php read the variable of another file? I put all my code: this is the text box into a index.php: Code:
<input name="search-q2" id="search-q2" type="text" onkeyup="javascript:autosuggest2()"/>Code:
case 'E': Code:
function autosuggest1() {Code:
<?phphere is all my code... |
Re: make a query with the value of text
Code: PHP
|
Re: make a query with the value of text
If I put echo $search-q2; the result is 0.
And, If I put echo $queEmp; i see a white page without results. With PHP is possible to give a variable of another PHP file? |
Re: make a query with the value of text
$search-q2 is an invalid variable name '-' is not a valid character for variables, try usinh '_' instead.
|
Re: make a query with the value of text
I change it. I put search_q2.
and.. I insert: echo search_q2;. The result of echo: search_q2!!!! why? |
Re: make a query with the value of text
echo $search_q2; ??
|
Re: make a query with the value of text
sorry. I put echo $search_q2;.
The result is a white page without results. |
Re: make a query with the value of text
In your code I see that you have defined $searchq and you are using $search_q
|
| All times are GMT +5.5. The time now is 13:04. |