$sql=mysql_query("INSERT INTO admin_cont
(contact_idemail , contact_timestamp , contact_objet , contact_message)
VALUES
('".$_COOKIE['zzzzz']."', '$timestamp', '$objet', '$message' ") or die(mysql_error());
i keep getting the error:
You have an error in your SQL syntax; check th...
Hi
Are there any native WP functions that are able to list files based by extension from a directory?
if not, how do I do this with php?
I want to get the file names of all .css files from a certain folder
...
hi y'all,
I have a funny thing going on with my local dev setup. Using codeigniter I have a form that should simulate storing some info from a user in a database. At this point I don't have the database setup yet I just want the form to send me to the success page when the validation is complete. But when I submit the form it comes back...
Hi,
I'm a beginner.
I write simple json jquery php code to help understand the idea of json, but its not work, please help me.(I didnt write $_Post, submit, click function etc.. because its not working with, soo I cut the code to find the problem)
The user enters view.html and should get an alert box with value Bob - the problem is th...
I am using a CMS system, which has a template for generating forms, with predefined CSS.
The CSS file in use is here
The form I am using at the moment is:
<div class="bodyline">
<?php $theform->startForm($pageTitle)?>
<div id="rightSideDiv">
<fieldset>
<legend><label for="report">Report</label></legend>
...
Is there any simple way to detect if mod_security is installed & enabled using just PHP? Ideally without any exec() terminal type commands to be executed.
Some people have recommended using apache_get_modules() but this specific web-host does not allow it to show. This is also mentioned by other users here: http://www.devcomments.com/a...
I have a database with 3 columns (item_number, seller_id, type) .
I'm getting the columns content using while loop.
$sql = msql_query("SELECT * FROM item_detals WHERE type='classifiedTitlePrice'");
while($row = mysql_fetch_array($sql)) {
$item_number = $row['item_number'];
$mcat = $row['mcat'];
}
However the problem is that a...
I have an OOP PHP site structured with a MVC pattern. A page on the site has an embedded SWF that needs to pull information from a database. In the past, I would have just had a procedural php file for the swf to load the data from the database from. However, that method doesn't seem like it would fit with a more objected oriented site.
...
How to disable moving in jsTree 1.0, but not disabling dnd plugin?
Thanks.
...
I have finished my new php script, and I'm about to sell it. I want to encrypt/encode/obfuscate or any thing that will enable me to protect my code.
I read every single post here about this matter, but I didn't get any clue. Is there any FREE tool I can use? Do you have other ideas on how to protect my code, so that nobody can resell it...
What's the best way to implement FTP upload and download in PHP? I'm using CodeIgniter and have Zend libraries.
...
Before anyone rips me a new one...I HAVE PERMISSION to hotlink images from an external site. It works all good, however I don't like that everytime i refresh the page it pulls the images again. My server is running PHP, is there a way to cache the images once, then display them via some local code. I'm really just looking for a way to sp...
Hi. I am trying to match a string, see example, such that a nested parantheses () is replaced by [] so to not break a parser somewhere else. In this case, I would like to replace the $myStr with "Arman; Dario (10040 Druento (Turin), IT)" ...
Thanks in advance!
monte
{x:
$myStr = "Arman; Dario (10040 Druento (Turin), IT)";
$pa...
I'm trying to use the weatherbug API, but seem to be stuck quite early in the proceedings.
The [very simple] code I tried:
function weather_widget($apikey, $zipcode) {
$url = "http://$apikey.api.wxbug.net/getLiveWeatherRSS.aspx?ACode=$apikey&zipcode=$zipcode&unittype=0&outputtype=1";
$contents = file_get_contents($url);...
Seems simple enough but I'm having some issues, I tried using preg_replace:
preg_replace("<br />", "", $string);
But what I get is this <> in place of the <br /> in the string when outputted. The break tags in the string will always be in this format not in any of these:
<br/>
<br>
<BR />
etc.
so what's the error I'm making?
...
I have a file called image.php and one called index.html.
This code is in index.html
<img src="image.php">
Now, is it possible for the image.php file to know that it was called by the index.html file ?
If so, how?
...
Hi all,
I'm starting a project to update our XML schema for the SOAP interface for the company I work for. Looking at the XML schemas at w3c I've noticed there's a specific datatype for duration. We currently use "HH:MM:SS" to specify duration, as opposed to 'P5Y2M10D'
The Snr Developer above me has said he'd like to keep everything co...
Hi, I use this class (taken from a blog tutorial) to generate unique keys to validate a form:
class formKey {
//Here we store the generated form key
private $formKey;
//Here we store the old form key
private $old_formKey;
//The constructor stores the form key (if one excists) in our class variable
function __co...
I am really new to drupal and new to php.
I have some questions.
Suppose I have a drupal and a server running on my local machine, how does drupal interact with database? (database is mysql)
it doesn't matter which version of drupal it is, I just want to know how drupal interacts with database.
Thank you!
...
Let's imagine I have a database and I want to programatically allow the user to build queries. I am coding in PHP and will output an HTML form to let the user specify his query.
I know the names of all fields, their types (int/string/date, etc) and maybe also min/max. How can I best present this visually to the user and let him select ...