Hello everyone,
I am parsing a MS Excel (.xls) file and adding it's content to a mySQL database, so far to good, but what I want to do is if the column titled description does not contain these words "seedlings" or "discount" then add it to the database but if it does skip it and keep looping.
Here is my code that I am trying to get working:if((!empty($description))or($available >0)and(!preg_match("/seedlings/i", $description))):
mysql_query("INSERT INTO `availability` VALUES ('','$description','$available','$price')");
endif;
I may not be using the right function for this "preg_match"?
Access website from only 1 computer...?
One of my customers wants his website to only be accessed by people in which they bought the website membership from on their computer. He's afraid that the users might share their login's with their
Problem with DB connection
Hello there! I'm new to this forum and I'm new to PHP coding also. I wrote something that doesn't make exactly what I thought it will. Can you give me a hand please. There we go:Code: [Select]
search function
HI guys,if anyone could point us in the right direction of how to do this, or provide some test code for a similar problem would be great!Basically, I have user profiles on my site, and I have a
xml
<?phpecho "<h1>XML Articles</h1>";$home="http://xml.x-alt.com/";// load the studentphones.xml file$channel =
php + mysql count consecutive data
I have a database of values and I want to work out how to display them if the values match a consecutive pattern.For example, I might have the table "eggs" with the values "1",
How to write on database when a link is clicked?
Hi,
need to add "sizes" to shopping cart
Hey guys, I am trying to figure out a way to add a "size" selector on to this bit of code. I added a way to view it in the "zoom.php" page and also to select a size from the sizes
Comparing Values
HiI'm reading data from a database and this seems to work OK.Each system has an associated series of references..Code:Code: $dn = "cn=System"; $filter="(objectclass=*)";
is_dir() problem
Hello,I'm buidling a php scripts that dynamically get's subfolders from a specific folder.my code:Code: <?php if(isset($button)){ $opendirdepot =
Reading waves
Hi,I am trying to find a way of finding the highs and lows on a graph line, the line points will be given in the form (x,y). Does anyone know a way to do this or a tutorial that will show me how to do