basantxbs 0 Newbie Poster

Hello everyone,

i need a help on integration of PayPal express checkout.
i have integrated the express checkout to the my site. After adding products to the cart user moves to the PayPal login screen. After login to the account user move to the review page. i want that user can add or edit the cart again after login to the PayPal. and pay the final amount from my site, rather than goin to the other site.


Please help me ASAP.

basantxbs 0 Newbie Poster

if you are using the wordpress. then go to the wp_setting.php at root directory, increase the memory limit using this WP_MEMORY_LIMIT constant.

basantxbs 0 Newbie Poster

You can use this code:

<?php 
	$text = $_SERVER['REQUEST_URI'];
	$data = explode('/', $text);
	$data_c = count($data) -1;
	$page= $data[$data_c];
?>

or
there is also a function called :
is_page()

basantxbs 0 Newbie Poster

first of convert the fetched value in timestamps then display it according to your need.

while ($newrow5 = mysql_fetch_array($result5))
{
 echo  date('d/m/Y',strtotime($newrow5['StartDate']));
}
basantxbs 0 Newbie Poster

ok i understand your problem.

Here is solution

function getArrCount ($arr, $depth=1) {
      if (!is_array($arr) || !$depth) return 0;
        
     $res=count($arr);
        
      foreach ($arr as $in_ar)
         $res+=getArrCount($in_ar, $depth-1);
     
      return $res;
  }

example:

$shop = array(array(array("rose", 1.25, 15),
                    array("daisy", 0.75, 25),
                    array("orchid", 1.15, 7) 
                   ),
              array(array("rose", 1.25, 15),
                    array("daisy", 0.75, 25),
                    array("orchid", 1.15, 7) 
                   ),
              array(array("rose", 1.25, 15),
                    array("daisy", 0.75, 25),
                    array("orchid", 1.15, 7) 
                   )
             );
// call the function

echo getArrCount ($shop);

I hope this will help you.

basantxbs 0 Newbie Poster

you can use the jpgraph it has variety of graph there. very easy to use.

http://www.aditus.nu/jpgraph/

basantxbs 0 Newbie Poster

Hi Everybody


I want list a categories in a tree structure. like this

cat 1
--> cat 1.1
-->cat 1.1.1
--> cat 1.2
cat 2
cat 3


i have a code which show all the category subcategory at a time but i want only those sub-category whoose parent category is clicked.
can anyone help me ..

here is my code

$nav_query = mysql_query("SELECT * FROM `category_tbl` ORDER BY `category_id`");
$tree = "";					// Clear the directory tree
$depth = 1;					// Child level depth.
$top_level_on = 1;			// What top-level category are we on?
$exclude = array();			// Define the exclusion array
array_push($exclude, 0);	// Put a starting value in it
 
while ( $nav_row = mysql_fetch_array($nav_query) )
{
	$goOn = 1;			// Resets variable to allow us to continue building out the tree.
	for($x = 0; $x < count($exclude); $x++ )		// Check to see if the new item has been used
	{
		if ( $exclude[$x] == $nav_row['category_id'] )
		{
			$goOn = 0;
			break;				// Stop looking b/c we already found that it's in the exclusion list and we can't continue to process this node
		}
	}
	if ( $goOn == 1 )
	{
		$tree .= $nav_row['title'] . "<br>";				// Process the main tree node
		array_push($exclude, $nav_row['category_id']);		// Add to the exclusion list
		if ( $nav_row['category_id'] < 6 )
		{ $top_level_on = $nav_row['category_id']; }
 
		$tree .= build_child($nav_row['category_id']);		// Start the recursive function of building the child …
basantxbs 0 Newbie Poster

I throw the exact same sql statement in phpmyadmin and it works but it does not work with mysql_query.

Ideas?

$a = "INSERT INTO players (player_id, first_name, last_name, date_of_birth, email, mobile_number, emergency_number, mother_name, father_name, player_number, team_captain, ip_address) VALUES ('', '', '', '', '', '', '', '', '', '', '', '127.0.0.1')"
$q = mysql_query($a);

May be your player_id is the primary key that's why it is not inserting. primary key should not be null. Check your table structure.

basantxbs 0 Newbie Poster

if u r using the firefox browser then go to the Tool->Options->contents from here u can enable the javascript.

basantxbs 0 Newbie Poster

Help!!! My Desktop Wont Appear because it is blocked by some kind of program or image that called form 1 or zapusk.exe ... i can't do anything to that image even i press task manager and alt F4. Help Me PLsssss....

P.S. Sorry For my Bad English

May be its a certain kind of virus attack
if it is then use your anti-virus


or
just go to the task manager
click on new task
type there

explorer.exe
then press
ok

regards,

basantxbs 0 Newbie Poster
$img_name=time().$_FILES['img']['name']; //  allow to upload more than one file with same name     
$temp_file=$_FILES['img']['tmp_name'];
		$dest_path="Image/".$img_name;
		
                if(move_uploaded_file($temp_file,$dest_path)){
                    echo "File is sucessfully uploaded at Image directory";
                }else{
                    echo "Error in uploading file";
                }

You can use this code . This will store your file at image directory.

basantxbs 0 Newbie Poster

Hi,

I am trying to write an upload script and everytime i try and upload a file it will give me an error.

Warning: move_uploaded_file(/home/******/public_html/dw/uploads) [function.move-uploaded-file]: failed to open stream: Is a directory in /home/******/public_html/dw/upload2.php on line 3

I have checked that the folder is there as the error suggests that it is not there but it is definately there.

My code is as follows

upload1.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
	<form enctype="multipart/form-data" method="post" action="upload2.php">
    	Send this file: <input name="userfile" type="file" /><br  />
        <input type="submit" value="Send File" />
    </form>
</body>
</html>

and upload2.php

<?php
					
	if (move_uploaded_file($_FILES['userfile']['tmp_name'], "/home/alanhuno/public_html/dw/uploads")) {
		print "Received {$_FILES['userfile']['name']} - its size is {$_FILES['userfile']['size']}";
	} else {
		print "Upload Failed";
	}
?>

are u working with xamp or wamp ?
this is only the path problem rest of the code is ok.