0/160

php Questions

votes
Robert Wills   2018-05-29 19:33

How do I make the first letter of a string uppercase in JavaScript?

How do I make the first letter of a string uppercase, but not change the case of any of the other letters? For example: "this is a test" -> "This is a test" "the Eiffel Tower" -> "The Eiffel Tower" "...
Masgan   2018-06-04 04:16

function code for hide element option checkbox [on hold]

I want to hide this option on checkbox. How can I hide this element for add line to the function.php wordpress theme? <div class=”col-md-12″> <label class=””> <input name=”...
Willy   2018-06-08 04:46

jQuery Ajax File Upload

Can I use the following jQuery code to perform file upload using post method of an Ajax request ? $.ajax({ type: "POST", timeout: 50000, url: url, data: dataString, success: ...
Thew   2018-06-08 12:02

jQuery Ajax POST example with PHP

I am trying to send data from a form to a database. Here is the form I am using: <form name="foo" action="form.php" method="POST" id="foo"> <label for="bar">A bar</label> &...
cletus   2018-06-09 12:20

Convert HTML + CSS to PDF with PHP?

I have an HTML (not XHTML) document that renders fine in Firefox 3 and IE 7. It uses fairly basic CSS to style it and renders fine in HTML. I'm now after a way of converting it to PDF. I have tried:...
Gordon   2018-06-19 12:41

Reference — What does this symbol mean in PHP?

What is this? This is a collection of questions that come up every now and then about syntax in PHP. This is also a Community Wiki, so everyone is invited to participate in maintaining this list. ...
Andrew G. Johnson   2018-06-19 13:49

How can I prevent SQL injection in PHP?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to SQL injection, like in the following example: $unsafe_variable = $_POST['user_input']; ...
Samuel Liew   2018-06-19 15:44

How do I check if a string contains a specific word?

Consider: $a = 'How are you?'; if ($a contains 'are') echo 'true'; Suppose I have the code above, what is the correct way to write the statement if ($a contains 'are')?
karlipoppins   2018-06-19 17:40

Should I use the datetime or timestamp data type in MySQL?

Would you recommend using a datetime or a timestamp field, and why (using MySQL)? I'm working with PHP on the server side.
Madara Uchiha   2018-06-19 19:29

Why shouldn't I use mysql_* functions in PHP?

What are the technical reasons for why one shouldn't use mysql_* functions? (e.g. mysql_query(), mysql_connect() or mysql_real_escape_string())? Why should I use something else even if they work on ...