Search found 139 matches

by lokanath7
Mon Nov 07, 2011 12:51 am
Forum: PHP coding => General
Topic: Php inside Html
Replies: 0
Views: 454

Re: Php inside Html

u cant use php code inside a .html file. if u really want this to happen then u can do it indirectly by using smarty (a template engine). by using smarty u can assign the php value and give it to .tpl file or directly in tpl file u can hardcode "<?php ?>" tag inside {liberal} tag. ie example.tpl {li...
by lokanath7
Wed Oct 19, 2011 2:52 am
Forum: PHP coding => General
Topic: PHP Shopping Cart using Sessions
Replies: 1
Views: 734

Re: PHP Shopping Cart using Sessions

make sure that u have an user session id. when click on add to cart button insert the product details to cart table where u hv to make "user_session" and "product_id" unique(combined). then in he display cart page u can search the current user session in ur cart table and respected products against ...
by lokanath7
Wed Oct 19, 2011 2:29 am
Forum: PHP Scripts
Topic: save file problem
Replies: 0
Views: 719

Re: save file problem

the problem is in this line $fp = fopen( "signature_IMG/\\\$acc2.canvas.png", 'wb'); u hv given 3 backward slash (\). these are used to escape character. if u want to escape for one backward slash then give \\ or if u want two \\ then give \\\\ then it will solve ur problem. here in ur code the 3rd ...
by lokanath7
Wed Oct 19, 2011 2:10 am
Forum: Your Scripts
Topic: need HELP / updating stock
Replies: 1
Views: 1701

Re: need HELP / updating stock

mark the last part of the query as there is an extra space in the code and i told u to delete that space...
inly this much change i hv suggested u.
by lokanath7
Wed Oct 19, 2011 2:05 am
Forum: PHP coding => Mail
Topic: PHP Post removes spaces from strings
Replies: 1
Views: 809

Re: PHP Post removes spaces from strings

if it is only the allignment problem then u can solve it by some designing change...
u can 1st explode those data with " "(blank space) and the array u get, place all those array value in a table format to display it in better way.
by lokanath7
Wed Oct 19, 2011 2:00 am
Forum: PHP coding => General
Topic: QUESTION WITH CSV FILE
Replies: 6
Views: 739

Re: QUESTION WITH CSV FILE

very good...it feels good when u solve ur problem by urself....i was asking for that csv file only to compare the contents with the results u have given...neways well done...
by lokanath7
Tue Oct 18, 2011 2:27 am
Forum: PHP coding => Mail
Topic: PHP Post removes spaces from strings
Replies: 1
Views: 809

Re: PHP Post removes spaces from strings

in html or php statement if u give spaces more than once it will neglect the extra spaces and deduce to one...if u really want to give spaces then instead of giving blank spaces give "&nbsp;"

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

it will show 5 spaces.
by lokanath7
Tue Oct 18, 2011 2:21 am
Forum: Your Scripts
Topic: need HELP / updating stock
Replies: 1
Views: 1701

Re: need HELP / updating stock

change this line
$sql2 = "INSERT INTO order_header (customer_id) VALUES ( '$customser_id ')";

to

$sql2 = "INSERT INTO order_header (customer_id) VALUES ( '$customser_id')";

if still have issues then give the full supporting code.
by lokanath7
Tue Oct 18, 2011 1:24 am
Forum: PHP coding => General
Topic: QUESTION WITH CSV FILE
Replies: 6
Views: 739

Re: QUESTION WITH CSV FILE

give the sample.csv file
by lokanath7
Tue Oct 18, 2011 1:04 am
Forum: PHP coding => General
Topic: a tag specification in style sheet
Replies: 1
Views: 444

Re: a tag specification in style sheet

Code: Select all

<style type="text/css">
ul li a{
	color:#9F0;
}
ul li a span{
	color:#C9C;
}
ul li ul.v-menu li a{
	color:#F0F;
}
ul li ul.v-menun li a{
	color:#FF0;
}
</style>
by lokanath7
Mon Oct 17, 2011 11:58 pm
Forum: PHP coding => General
Topic: Create a rar file
Replies: 2
Views: 1556

Re: Create a rar file

yes it is possible to create rar file using php. Only u have to uncomnment the line extension=php_zip.dll from php.ini file then use this code (using ZipArchive library) <?php /* creates a compressed zip file */ function create_zip($files = array(),$destination = '',$overwrite = false) { //if the zi...
by lokanath7
Tue Oct 11, 2011 2:50 am
Forum: PHP Scripts
Topic: Fatal error: Call to undefined function doDB()
Replies: 0
Views: 859

Re: Fatal error: Call to undefined function doDB()

is that doDB() is defined in "connect.php" ? if yes then give the code written in "connect.php"
by lokanath7
Tue Oct 11, 2011 2:45 am
Forum: mySQL & php coding
Topic: form not sending text?
Replies: 2
Views: 514

Re: form not sending text?

u hv written

$sql = "INSERT INTO something1 ( info, more_info)
VALUES ('$userinput1','$userinput2')";

but u wont run the query using "mysql_query()"

do that it will insert ur data to db...
by lokanath7
Tue Oct 11, 2011 1:05 am
Forum: PHP coding => General
Topic: Help:Inserting Multiple column values in one query!!
Replies: 3
Views: 666

Re: Help:Inserting Multiple column values in one query!!

instead of ur php code write this... if(isset($_POST['submit'])) { $date=$_POST['date']; $from=$_POST['sender']; $sqltext=$_POST['text']; $to=$_POST['receivers']; $sep_com = explode(",",$to); foreach($sep_com as $value) { $sql = "INSERT INTO smsdetails(col1,col2,...) VALUES ('','$date','$from','$sql...
by lokanath7
Tue Oct 11, 2011 12:10 am
Forum: PHP coding => General
Topic: Save ids of input boxes
Replies: 1
Views: 436

Re: Save ids of input boxes

the ids are required to uniquely identify the form element (in this case input box) not to save them. if u want to save then save their value not ids... ids and names are required only for validation and for post purpose names are required.
by lokanath7
Fri Sep 30, 2011 2:48 am
Forum: PHP coding => General
Topic: How to post <li> items
Replies: 0
Views: 452

Re: How to post <li> items

<ul> <li> are not form elements...so u cant post their values but if u want then try with hidden field...
by lokanath7
Thu Sep 15, 2011 2:50 am
Forum: PHP General
Topic: Have been trying to figure this out all night....
Replies: 0
Views: 530

Re: Have been trying to figure this out all night....

in the very 1st line u have redirect the page to "index.html" so u need to give that file code to hv a look otherwise this code doesnt have ne parse error as i hv tried to execute it without the 1st line...
by lokanath7
Thu Sep 15, 2011 2:43 am
Forum: Your Scripts
Topic: Undefined Variable Error
Replies: 7
Views: 2260

Re: Undefined Variable Error

ur calling func no. of argument is not the same as the defined func argument...
chk it and arrange them in right order...
by lokanath7
Tue Sep 13, 2011 6:47 am
Forum: mySQL & php coding
Topic: Need some help
Replies: 0
Views: 381

Re: Need some help

give a semicolon after end of line 12...
by lokanath7
Tue Sep 13, 2011 6:13 am
Forum: mySQL & php coding
Topic: Why is my PHP not updating my database?
Replies: 6
Views: 885

Re: Why is my PHP not updating my database?

try this...

$query = "INSERT INTO blogdata(`title`, `category`, `content`) VALUES('$title', '$category', '$content')";
by lokanath7
Wed Sep 07, 2011 12:46 am
Forum: PHP coding => General
Topic: Form errror handling strategy
Replies: 6
Views: 1112

Re: Form errror handling strategy

thanx Nullsig...to clarify my statement so clearly...
by lokanath7
Mon Sep 05, 2011 6:57 am
Forum: PHP coding => General
Topic: Form errror handling strategy
Replies: 6
Views: 1112

Re: Form errror handling strategy

the more userfriendly the interface is more difficult to the programmer...in that sense u sud do ajax validataion and show inline error to user which is popular now a days...
by lokanath7
Mon Sep 05, 2011 6:55 am
Forum: PHP coding => General
Topic: Can't get the return value from class
Replies: 1
Views: 687

Re: Can't get the return value from class

try this

include("classes/login/LoginHandler.php");

and if still doesnt work try write
include( it will ask to browse the file and do it by browsing...the url will be added automatically...
by lokanath7
Mon Sep 05, 2011 1:02 am
Forum: PHP coding => General
Topic: Form errror handling strategy
Replies: 6
Views: 1112

Re: Form errror handling strategy

error handling is done according to the requirements.
u can do it by simple javascript alert boxes or u can do it inline validation using ajax by showing the error msg in red as u hv said...but it totally depends upon the requirement.
by lokanath7
Mon Sep 05, 2011 12:55 am
Forum: PHP coding => General
Topic: Help needed with PHP Form options
Replies: 0
Views: 383

Re: Help needed with PHP Form options

if u have static data to be displayed then u can do it bye submitting the form by changing the option from select ie "onchange()" event.

when change the 1st select option then submit the form and pick the submitted value of the select option and write code (if...else) according to that...and so on...