0
votes
0answers
13 views
PHP PDO: how to prevent javascript and html tags injection
I am using following script to update some data in MYSQL table, for that i am taking data from user. But it is not preventing from javascript and html tags.
$attri= //containing field name like ...
-3
votes
2answers
20 views
How to insert some common data using CSV upload?
With CSV upload feature I can upload all my repeating data to my MySQL database. Suppose I have some fields like:
+------+-------+-----+--------+
| Year | Month | Day | Figure |
...
0
votes
1answer
34 views
Always login with password into the same database, whenever query or update at any time
Hi stackoverflow users
I had problem with the understanding when I build the PHP website to access to the same database.
I am using PHP, PDO and MySQL. I am confused.
Do the code always have to ...
0
votes
2answers
42 views
MySQL Syntax error on Insert Query from PHP
I'm getting a non-descriptive syntax error on a MYSQL query from PHP. If I "echo" the text of the query and paste it into a MySQL query window, the code works. Here is the SQL for the query, the error ...
-5
votes
1answer
26 views
Store muliple form with same name result into mysql [on hold]
Ok as title said i need to store multiple form data.
Imagine there is 3 input text form and 1 select form. All of them multiplied 10 times.
Also store only filled forms data into mysql database.
How ...
0
votes
2answers
28 views
Query Select Sql with Condition from a Value of Html combobox
I have a problem of my web programming using php. I have an input form where there are two combobox with several options.
In the form, there also a textfield of Code where the value is determined by ...
0
votes
4answers
28 views
how can I know how many rows will update sql affected before I execute it
whe can see how many record will be selected in this sql bellow using explain:
explain select * from products
but expain is not for update and delete command.
In php, I want to update an table ...
0
votes
1answer
17 views
Drop down menu with current usersnames that displays person details once clicked
i am trying to make a staff details page that has a drop down menu with the currently registered users in it. when the user select's a name it redirects them to a new page with the selected person ...
0
votes
1answer
16 views
Do I still have to use JQuery to populate my second drop down menu even if the values are the same as the first drop down menu?
At the moment, I am trying to create two drop down menus that will act as time intervals. My goal is to set it up where if the user selects a year in the first drop down menu, then the next menu will ...
1
vote
3answers
28 views
Changing a select statement to return all rows under certain conditions
I have a select option where the user can choose country and state.
The user can select an "all states" option:
<select>state</select>
search all value=''
CA value='CA'
NY ...
0
votes
1answer
17 views
Force Unique Insert
I have a MySQL table with a "unique" column, I occasionally need to insert some data into it so I am wondering is there any keyword that I can pass in order for mysql to generate a unique string that ...
0
votes
0answers
25 views
MySQL match against literal string in some columns but not in others
I have a query
"SELECT
*
FROM
`tbl_listing` AS `al`
WHERE
(MATCH(`al`.`title`, `al`.`listing_title`) AGAINST('" . $search_query . "*' IN BOOLEAN MODE) OR
MATCH(`al`.`description`) AGAINST('" . ...
0
votes
1answer
40 views
PHP/MySQL where have I gone wrong?
So first of all I'm trying to populate a database with this PHP script. The error I am receiving is - "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server ...
3
votes
1answer
25 views
How to construct a more complex mysql query for optimization
I have this lovely piece of code that I want to optimize:
$result = mysql_query("select day from cities where name='St Charles'");
$row = mysql_fetch_assoc($result);
$day = $row['day'];
$result = ...
0
votes
0answers
19 views
blank pdf file using TCPDF
This is my first post on SO, I hope I get this right.
I have a column in a mySQL database that contains HTML. I retrieve this content using the following code:
$sql = "SELECT html_content FROM ...