Questions tagged [php]

Use ONLY if PHP is directly relevant to the question and likely to be the source of your problem, not just because you're using a PHP library to connect to a database. PHP stands for Professional Hypertext Preprocessor, a widely used platform for dynamic web applications. If you have a general programming question about PHP, please ask it on Stack Overflow instead.

Use only if PHP is directly relevant to the question and likely to be the source of your problem, not just because you're using a PHP library to connect to a database.

PHP is a widely used web open-source web application platform, commonly used in conjunction with MySQL. Originally an abbreviation for 'Professional Home Page' the official backronym is now 'Professional Hypertext Preprocessor'. PHP is a key component of he eponymous 'LAMP' (Linux, Apache, MySQL PHP) web stack. The primary web site for PHP is http://www.php.net/.

If you have a question about PHP, and it's not intimately about databases, you would probably be better served on our sister site Stack Overflow.

673 questions
2
votes
1 answer

Creating tables PDO Sqlite

Hello guys i have worked on mysqli but not pdo sqlite i don't know what syntax is to create tables here if not exists this is my code please tell me why am i getting error on last line. $Database = new…
2
votes
1 answer

select from database with special characters

I am using php select * from `outstanding` where `lcocode`='PN007\00128' select * from `outstanding` where `lcocode` LIKE 'PN007\00128' kindly suggest code for fetching data with backslash I used above code but did not got results.
Rupinder
1
vote
1 answer

Saving arrays in database - PDO

I want to save an array in my database friends column. Actually I want to create friend request system. My method is a little bit different. I want to have two columns for this…
1
vote
6 answers

is it possible to create a dynamic website without a database?(Only use a File to save Data)

I learn PHP from now. And for create a dynamic website usually use PHP + MYSQL(For database). In PHP have function like fopen() to create, write result from form to a file like txt or other. My Question is, is it possible to create a dynamic…
Uchsun
  • 359
  • 3
  • 5
  • 16
1
vote
1 answer

Sanitizing a form's database input while retaining basic HTML markup

Is there a way to sanitize database input (say, for a comment form), which also allows for the end user to use basic HTML styling markup? As in, if a user wraps their text in / or /, the text gets styled, all while preventing…
Jules
  • 23
  • 9
1
vote
0 answers

Can't delete from a table with two conditions using PHP

I am trying to delete a row from a table using two conditions. this is my code :
0
votes
1 answer

What OODBMS are available for PHP?

I need an OODBMS for my website, to handle hierarchies and inheritance. I use PHP and I have a feeling I am asking too much and will have to do with regular RDBMS...
Some_user
  • 61
  • 8
0
votes
1 answer

How do I select distinct one column and return the other column data that has been distincted?

I am newbie to SQL and PHP programming so please be patient with me. :) For example I have one table with three fields: ID, ITEMNAME, SIZE, and data like this: +----+--------------+-------+ | ID | ITEMNAME | SIZE1…
Mico M
  • 3
  • 2
0
votes
1 answer

Unknown column 'sitename' in 'where clause'

public function getSiteValues($value) { $this->db->select( 'site', 'id, option_name, option_value', NULL, 'option_name=' . $value ); // database, what to take, where value $res =…
alex
  • 23
  • 2
-2
votes
1 answer

how to count primary key of one table inanother table?

how to count primary key of one table which is used in another table in 5 to 6 column? If table 1 has primary key srno which is used in table2 in column d1,d2,d3,d4. I want to count how many times srno=1,2,3,4... etc used in table2. any one know how…
-6
votes
1 answer

I want to make drop down elements compulsory but unable to do so in php file

I want to make it compulsory for user to select one of the option in city , if he will not select the drop down option , the form will not submitted. But it is not happening...following is the code... request you to please help... will be of great…
Sachin
  • 91
  • 3