Search found 25 matches

by TomCornar
Mon Sep 24, 2012 2:52 am
Forum: PHP coding => General
Topic: Copy files from one directory to another
Replies: 0
Views: 427

Re: Copy files from one directory to another

Hi,

Try the below for copying the files from one directory to another,

Code: Select all

copy('folder/new.php', 'newfolder/new.php');
If the destination file already exists, it will be overwritten.

Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com
by TomCornar
Mon Sep 24, 2012 1:10 am
Forum: PHP coding => General
Topic: form input e output
Replies: 0
Views: 371

Re: form input e output

hi, you have to use the same name for both the radio buttons.If "yes" is selected the output will be 1 .If "no" is selected the output will be 0. Yes <input name="privacy" type="radio" value="1" checked=""> No <input type="radio" name="privacy" value="0">[/code Get the radio button value using '$pri...
by TomCornar
Mon Sep 24, 2012 1:00 am
Forum: PHP coding => General
Topic: how to use % in like operator in php
Replies: 4
Views: 581

Re: how to use % in like operator in php

Hi, i have tested the above query.It is working.Below is the tested Code. mysql_connect("localhost","root",""); mysql_select_db('dbname'); $search='de'; $sql=mysql_query("SELECT `artist` FROM `albums` WHERE `artist` LIKE '%$search%'"); $result=mysql_fetch_assoc($sql); print_r($result); //Output Sade...
by TomCornar
Mon Sep 24, 2012 12:06 am
Forum: JavaScript
Topic: HTML <Select multiple > and Javascript
Replies: 2
Views: 2542

Re: HTML <Select multiple > and Javascript

Hi , Try the below Code. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> <script language="javascript" type="text/javascript"> function SelectAll() { var SelectedOptions = document.getElementById("fruits"); var msg=""; for (var i=0;i<SelectedOpti...
by TomCornar
Sun Sep 23, 2012 11:25 pm
Forum: PHP coding => General
Topic: how to use % in like operator in php
Replies: 4
Views: 581

Re: how to use % in like operator in php

hi,
Try the below query.This should work.

Code: Select all

mysql_query("SELECT `name` FROM `tab1` WHERE `name` LIKE '%$search%'");
Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com
by TomCornar
Fri Sep 21, 2012 2:47 am
Forum: PHP Scripts
Topic: retrieving data from db
Replies: 2
Views: 1264

Re: retrieving data from db

hi,you have to use pagination .check this link,

http://www.roseindia.net/sql/mysql-exam ... tion.shtml

hope this helps.

Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com
by TomCornar
Tue Sep 18, 2012 5:50 am
Forum: mySQL & php coding
Topic: mySQL PHP dropdown loop
Replies: 0
Views: 961

Re: mySQL PHP dropdown loop

hi, Try this, <select name="charname" value="Select" size="1"> <?php $sql = "SELECT * FROM characters"; $result = mysql_query($sql) or die (mysql_error()); while ($row = mysql_fetch_array($result)) { $value=$row["your column name"]; $options.="<OPTION VALUE=\"$value\">".$value; } ?> <option> <?php e...
by TomCornar
Tue Sep 18, 2012 3:50 am
Forum: PHP General
Topic: Form Select
Replies: 1
Views: 827

Re: Form Select

Hi,

do u mean to display the two dropdowns.One for name and another for address..

Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com
by TomCornar
Tue Sep 18, 2012 3:05 am
Forum: PHP Scripts
Topic: Help with PHP/MYSQL
Replies: 0
Views: 926

Re: Help with PHP/MYSQL

hi ,

your form has no method.

change

<form> to <form method="post">

Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com
by TomCornar
Tue Sep 18, 2012 2:26 am
Forum: PHP Scripts
Topic: Php search engine for a site
Replies: 0
Views: 851

Re: Php search engine for a site

hi,

you can add google custom search for your site.check this link,

http://www.google.com/enterprise/search ... s_gss.html.

hope this helps.

Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com
by TomCornar
Tue Sep 18, 2012 1:51 am
Forum: JavaScript
Topic: not loading content within the div tag
Replies: 1
Views: 1592

Re: not loading content within the div tag

hi,

have u used ajax jquery tabs.If so post ur ajax code to get the further help.

Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.comthanks
by TomCornar
Tue Sep 18, 2012 1:21 am
Forum: PHP Installation
Topic: pdo_mysql not loading
Replies: 0
Views: 1405

Re: pdo_mysql not loading

hi ,

have you checked in the path( /usr/lib64/php/modules/ ) that pdo_mysql.so is available.

Also have you enabled the pdo_mysql in php.ini.

Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com
by TomCornar
Tue Sep 18, 2012 12:07 am
Forum: PHP Installation
Topic: How to install xdebug for php in linux system?
Replies: 1
Views: 1203

Re: How to install xdebug for php in linux system?

hi,

check this link,

http://wiki.netbeans.org/HowToConfigureXDebug

hope this will help for installing and configuring the x-debug for php.

Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com
by TomCornar
Mon Sep 17, 2012 11:55 pm
Forum: PHP Installation
Topic: Need help to install only xml-rpc package in php ?
Replies: 1
Views: 1348

Re: Need help to install only xml-rpc package in php ?

hi,

have you tried with

Code: Select all

yum install php-xmlrpc
Once this is installed.you have to enable the xmlrpc in php.ini

Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com
by TomCornar
Mon Sep 17, 2012 5:05 am
Forum: PHP coding => General
Topic: Dropdown in php
Replies: 1
Views: 664

Re: Dropdown in php

hi,
Use Js or jquery to load the first select box value using onchange event in second dropdown.


Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com
by TomCornar
Mon Sep 17, 2012 4:38 am
Forum: PHP Installation
Topic: Need help downgrade from php 5.4 to 5.3
Replies: 1
Views: 1880

Re: Need help downgrade from php 5.4 to 5.3

hi , if you are using the ubuntu.check this link for downgrading php. http://dustyreagan.com/downgrade-php-5-3-to-5-2/ (or) using yum command yum downgrade php-dba php-soap php-ldap php-mysql php-mcrypt php-common php-cli php-gd php-odbc php-xmlrpc php-snmp php-bcmath php-imap- php-devel php-pdo php...
by TomCornar
Mon Sep 17, 2012 4:27 am
Forum: PHP Installation
Topic: php.ini configuration
Replies: 1
Views: 1824

Re: php.ini configuration

hi,
you have to edit the following settings in the php.ini.


upload_max_filesize
max_execution_time
post_max_size
max_input_time
memory_limit

Regards,
Tom Cornar
Trinay Technology Solutions
by TomCornar
Mon Sep 17, 2012 2:58 am
Forum: PHP General
Topic: users location and figuring out kilometers
Replies: 0
Views: 662

Re: users location and figuring out kilometers

hi,

you can use geoplugin.It is a free plugin and will get the User location Information using their ip address.

check out the plugin,

http://www.geoplugin.com/


Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com
by TomCornar
Mon Sep 17, 2012 2:33 am
Forum: PHP Installation
Topic: Upgrade PHP 5.1.6 (cli) to PHP 5.2
Replies: 0
Views: 1375

Re: Upgrade PHP 5.1.6 (cli) to PHP 5.2

hi,
If yum update didnt work.you can remove all the php packages and install the latest php packages.

check this link,

http://chrisjean.com/2011/06/24/upgrade ... on-centos/

Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com
by TomCornar
Mon Sep 17, 2012 12:59 am
Forum: PHP coding => General
Topic: bilingual site in php
Replies: 1
Views: 1001

Re: bilingual site in php

Hi, You can try "Poedit" tool for multilanguage website. I have used Poedit with zendframework to translate the entire website to spanish if user preferred lang is spanish or show the website in english. http://www.poedit.net/ . hope this helps Regards, Tom Cornar Trinay Technology Solutions http://...
by TomCornar
Sun Sep 16, 2012 11:32 pm
Forum: JavaScript
Topic: Disable select if options are empty
Replies: 1
Views: 1270

Re: Disable select if options are empty

Try this,

$('select:not(:has(option))').attr('disabled', true);

Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com
by TomCornar
Sun Sep 16, 2012 11:27 pm
Forum: PHP General
Topic: relation two listbox
Replies: 0
Views: 660

Re: relation two listbox

On first select box onchange.call the juery .ajax()
Use Jquery Post to php file and get the value from db.On success append the value to the selectbox.

hope this helps
Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com
by TomCornar
Sun Sep 16, 2012 11:21 pm
Forum: PHP General
Topic: If the id doesn't exist how to redirect to id=1?
Replies: 0
Views: 771

Re: If the id doesn't exist how to redirect to id=1?

SELECT COUNT(*) as count FROM demotivators WHERE id = '$id'

$count=mysql_fetch_assoc($result);
$count=$count['count'];
If($count >0)
{
/*Your functionality*/
}
else
{
/* redirect */
}
hope this helps.
Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com
by TomCornar
Sun Sep 16, 2012 11:16 pm
Forum: PHP General
Topic: simple jQuery dialog
Replies: 2
Views: 1089

Re: simple jQuery dialog

try with below code,
<input type="image" src="" id="opener">

Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com
by TomCornar
Sun Sep 16, 2012 10:58 pm
Forum: PHP General
Topic: change inpu type via php
Replies: 0
Views: 624

Re: change inpu type via php

Try with js or jquery to sum up the two text box value to another textbox using onclick event. <script type="text/javascript"> function sum() { var value1=document.getElementById('textone').value; var value2=document.getElementById('texttwo').value; document.getElementById('textthree').value=(value1...