All Questions
4,097
questions
34
votes
4
answers
68k
views
Database Design For Developing 'Quiz' Web Application using PHP and MySQL
So, I'm trying to learn PHP and MySQL (I have a basic understanding of both; I've read the first half of both Head First SQL and Head First PHP & MySQL) and I figure the best way to solidify my ...
24
votes
2
answers
23k
views
Can MySQL automatically convert empty strings to NULL?
There is an excellent SO on MySQL empty strings versus NULL here, MySQL, better to insert NULL or empty string?, however it doesn't take in to account 'uniformity' - i.e. if you want to have just one ...
18
votes
13
answers
70k
views
How to get Country Code from (intl-tel-input) plugin after submitting the form?
I've installed the plugin and Its displaying the countries correctly and working fine, but when I submit the form that has the input of type = "tel", the form does not submit the country code, I don't ...
13
votes
4
answers
15k
views
Comparing 2 exact same strings returns false
I have a variable that is posted through a html form:
$_POST['ref']
And a variable that is pulled from a table in a database:
$row['ref']
i have a basic comparison script to check if they are both ...
12
votes
3
answers
104k
views
Insert data into Wordpress database table from a custom form
I am trying to insert data into Wordpress database by creating a table. I have created the table but when I try to insert the data from form, it does not insert the data. I have checked that database ...
11
votes
6
answers
11k
views
CakePHP saving HABTM data
I have 2 models, Client and Security. They are associated with a HATBTM relationship.
I have made a join table called clients_securities. So a Client can have many securities and a Security can belong ...
9
votes
1
answer
4k
views
Rails 3 and saving decimal values from a form
I have an odd bug in one of my applications.
When I am using the sqlite3 database the bug is not present. However when I use mysql2 as the database adapter I run into an error saving decimal values ...
9
votes
4
answers
41k
views
php return to page after form submission
I've created a html form
<form action="http://localhost/php/insert.php" method="post">
Barcode: <input type="text" name="barcode" /><br><br>
Serial: <input type="...
9
votes
1
answer
19k
views
$_POST variables not working with $_FILES and multipart/form-data
Problem: Whenever I change the enctype on my HTML form to multipart/form-data, $_POST variables do not populate in my php script. Users upload files along with filling out a form, and the files upload ...
8
votes
5
answers
16k
views
PHP to output single and double quotes as a value for an input element
I have a value ($title) that is stored in MySQL and is being called, using PHP, to be inserted into the value of an input element. The problem is when a single or double quote is used, the value of ...
8
votes
2
answers
5k
views
Database design for custom form builder (and storage of results)
I'm trying to implement a custom form builder, similar to those provided by Wufoo and Google.
While I've created a simple UI to create these custom forms with, my issues lie in the database design. ...
7
votes
5
answers
156k
views
Fetching data from MySQL database using PHP, Displaying it in a form for editing
I'm a newbie to this and wrote the code below to fetch user data from a MySQL Database and display it in a form for editing and saving. Problem is, it does not work. Any help will be appreciated.
<...
7
votes
6
answers
14k
views
Does HTTPS make POST data encrypted?
I am new to the world of programming and I have learnt enough about basic CRUD-type web applications using HTML-AJAX-PHP-MySQL. I have been learning to code as a hobby and as a result have only been ...
7
votes
2
answers
8k
views
How do I properly sanitize data received from a text area, when outputting it back into the text area?
A user will input text in a textarea. It is then inserted directly into a mySQL database. I use trim, htmlentities, mysql_real_escape_string on it and I have magic quotes enabled. How should I ...
7
votes
3
answers
10k
views
Populating a dropdown menu with database results in Laravel 4
I'm trying to populate a drop down menu with database results in Laravel 4. I'm extremely new to Laravel. This is actually my first site and I'm learning as I go. So, please tell me if I'm using the ...