Hello Everyone....
Suppose I have a application form which contain lot of boxes like email,username,age etc...I have connected this application form to database(mysql) through action="register.php" in application form...
NOw i want that in database,username and email id should be unique.Means no two users cant have same username or ema...
Hey guys,
So I'm using the PHP function fgetcsv to parse a .csv file (comma separated, fields are enclosed by "") and import it to a MySQL. The problem is, a certain field is always empty, even though it should sometimes contain "0". So I'm guessing the function consider "" and "0" as null values, but it's quite problematic for me. Any ...
I have code that in the connection setup selects the database using mysql_select_db().
$link = mysql_connect('localhost', 'user', 'pass');
mysql_select_db("database1");
Can I later run a query against two databases such as:
SELECT database1.row, database2.row
FROM database1.table, database2.table
WHERE database1.row = database2.oth...
Hello,
I have some settings which I want to use in .htaccess file. The settings are for some functionality at /admin/tool folder level .. but I want to include some settings for /admin and / locations as well.
My question is what is the best location to put this file at??
Thanks
Update
Just fyi .. I want to apply settings like
ma...
Hi,
I am not sure how to do this, but if it can be done can anyone please help me in this.
Basically I have 3 columns in my table:
ID Set Result Case
1 Set1 PASS 101
2 Set2 FAIL 102
3 Set2 FAIL 101
4 Set1 FAIL 101
5 Set1 PASS 104
$set = $row['Set'];
What I am trying to achieve is , foreach of these...
Im trying to get some values from the below xml feed
<?xml version="1.0" ?>
<SEARCH>
<LOCATION>
<NAME>Terrance</NAME>
<COUNTRY>USA</COUNTRY>
</LOCATION>
<FOUND>
<TOTALOFOUND>
<TOTAL>3</TOTAL>
</TOTALOFOUND>
<PLACE>
<ADDRESS>IL Road</ADDRESS>
<NAME>shop1</NAME>
<POSTCODE>5</POSTCODE>
<CAT...
For some reason it's not changing the action of the forum. I have some code to change the action of a form when a button is clicked:
function changeForm(event){
alert("Before: "+jQuery("#franchiseform").attr("action"));
jQuery("#franchiseform").attr("action", "franchisepreview.php");
alert("After: "+jQuery("#franchiseform...
On my PHP site, currently users login with an email address and a password. I would like to add a username as well, this username they g\set will be unique and they cannot change it. I am wondering how I can make this name have no spaces in it and work in a URL so I can use there username to link to there profiles and other stuff. If ...
I'm creating a php cli program to generate unit tests for our project. in the command line a enter a sourcefile and a destination file. If the destination file allready exists I parse it with Zend_CodeGenerator_File::fromReflection(). The destination file is the unit test class file. Then I check what methods need to be added to the unit...
I am looking at taking on a e-commerce site, and what was wondering what everyone thoughts on e-commerce package vs bespoke solutions are, is it beneficial to just use a 'plug+play' system like osCommerce, or maybe using something a bit more robust but with a fee and use something like Magneto?
Or would it be better for just to site do...
On my site I have a config file which has many settings that need to be accessed in many pages, including inside many class files. The config file is included into the header of every page build. Since I will be using a registry method to store some objects in, I am wondering if it would be better for me to store some setting in this c...
Hello, I have a javascript character counter that I use inside of a text area. It works great in normal html, but when I put the exact same code inside of a text area inside php, nothing.
Here it is in html when it works fine:
<div id="counter">
<span id="counter_airway" style="font-size:11px; color:#666666;">140 Character Limit</sp...
I have these tables:
category table:
cat_id (PK)
cat_name
category_options table:
option_id (PK)
cat_id (FK)
option_name
option_values table:
value_id (PK)
option_id (FK)
value
classifieds table:
ad_id (PK) (VARCHAR) something like "Bmw330ci_28238239832"
poster_id (FK)
cat_id (FK)
headline
description
price
etc....
posters table:
po...
I'm trying to add all the values from the grade_points field for example 10, 12.5, 2.1 and then divide it by how many times grade points where entered into the database for example 24.6 / 3.
I know that $total_rating_points is an array but I don't really know how to convert the array so I can add the total grade points and then divide i...
Hi,
i have a this function which resizes images but the final quality looks blurred too much and not clear:
Any other class or a solution to improve the quality of thumbnails ?
Thanks
Other Note - i already changed the quality to 100 but nothing happened!
...
I am currently using symfony 1.4 and would like to allow users to upload Microsoft Word docx files. Using the sfWidgetFormInputFile widget and sfValidatorFile below users are able to select and successfully upload their docx files using a simple web form.
$this->widgetSchema['file_name'] = new sfWidgetFormInputFile(array('label' => 'Fi...
I have two tables each with a field we will call widgetid.
I need to run a query on both tables, that will return a single list of widgetid's from both tables.
I have no idea how to do this.
What i have now is:
$result = mysql_query("SELECT * FROM `inventory` WHERE find_in_set('$serial', items)") or die(mysql_error());
...
i am sending 5 different data across to a php file through POST method. the data is all integers. i want to add up all these integer values to produce a sum.
$.post(
"user_submit.php",
{score: $('#ques'+qn).find('input[name=vote]:checked').val() },
function(data){
$("#ques"+qn).hide();
...
Basically, I want the same effect as the oldschool html 'frameset' I think.
Take a look at this page please:
http://onomadesign.com/wordpress/identity-design/alteon-a-boeing-company/
If a user selects a project from industry -> transportation for example, I would like that the right scrollmenu keeps its initial state when the new proje...
My code is no white spaces before or afther
<?php
ob_start();
header("content-type:text/xml; charset=UTF-8");
function getXML($sql="Default Query")
{
$conn=mysql_connect("*","*","*");
$db=mysql_select_db("*");
$result = mysql_query($sql,$conn);
$columns="";
echo "<records>";
while($row=mysql_fetch_assoc($result...