I'd like to ask you how to convert a string into a decimal before update a table or insert data into table, after a user inserts a row, or update a row from a dataGridView.
In my case, I want the column of price to be decimal, I do it as following, but it is not work, please help, thanks...
So you enter that text in your textarea with then name content and... What do you mean "can not submit" ?
the IE browser give me some massage with "HTTP 406 not acceptable"
1.
By the way, you are HTML encoding the string before inserting it into the database. Are you sure you want that ?
Sorry, i should put it into html page
diplay.php
function output($str)
{
return htmlspecialchars($str);
}
..........
..........
echo...
if i post some data as following after i changed my code, it meets database attack. why?
"Man slugged $300 by police during dispute with local gym!@#$%^&*()_-+={}[]|\:";'<>,.?/
As from that fragment is not clear what $content variable does
the form.php for user post a thread as we do here.
and i change the code as following, please check it is ok now.
Form.php
<form action="verify.php" method="GET" >
<textarea class="textarea" rows="10" cols="70" name="content"...
>>No, I mean to escape the special characters in the received >>string. In your earlier code that would look like :
Please check the following my code, is it ok
form.php
<form action="verify.php" method="GET" >
<textarea class="textarea" rows="10" cols="70" name="content"...
i try fulltext, it looks good
SELECT ... MATCH () AGAINST() as score from .... WHERE MATCH () AGAINST () order by score desc;
and i will change post data by using Get method
1)What kind of database are you using ?
mysql
2)
What is received in $_POST['search_string'] ?
games keyword
3)What are you hoping to get as result ?
the most relevant with games keyword must sit on the top of the other one
>>>Please note that you are grouping by id and id is primary key. So...
Hi;
I am trying to implement a search engin, and i want the most relevant results that must sit on top of the other ones. but my code does not always bring out right result, could anyone help, thanks
create table keyword_relevance
( id tinyint not null primary key auto_increment
...
>What happens when you type >http://localhost_or_whatever_it_is/path/to/display_thread_image.php?>image=cat.jpg in the browser's location bar ?
the browser tell me the webpage could not find, but my test_1.php works.
the following .php file is where i display my image file.
could you help me...
In another .php file, i have a code as following, but it still could not display out the image.
$image="cat.jpg";
echo " <img alt=\"image\" src=\"display_thread_image.php?image=$image\" /> ";
you are right, i change it as following, but still not work.
if(exif_imagetype($filename)==IMAGETYPE_JPEG)
header('Content-Type: image/jpeg');
else if(exif_imagetype($filename)==IMAGETYPE_GIF)
header('Content-Type:image/gif');
if(exif_imagetype($filename)==IMAGETYPE_JPEG)...
Hi;
I got a problem to output resize image after i check the type of image.
Could anyone help me, thanks.
The test_1.php has not problem to output image, but the test_2.php could not output image.
test_1.php
<?php
$image=$_GET['image'];
// The file
$filename = '../images/thread_images/'...
>>>> where in the code can you set $q = null to get the error?<<<
From index.php
include("getSql.php");
function get_number_of_rows(){
include("../condatabase.php");
$searchStr=$_GET['searchStr'];
$q=get_sql($searchStr)...
[CODE]
convert_data.php
<?php
function output_post ($post) {
//Make safe any html
$post_no_html = htmlspecialchars($post);
//Make sure there is no whitespace at the end of the message
//It's conceivable that the user will start their message with whitespace
$post_abridged =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.