ko ko 97 Practically a Master Poster

String concatenation error on line 15 inside while loop.
echo 'There are . $result . 'members';}

Try this:

$result=mysql_query("SELECT COUNT(*) AS total FROM registration") or DIE(mysql_error());

$row = mysql_fetch_row($result);

if($row[0]['total'] > 0) {
    echo 'There are ' . $row[0]['total'] . ' members.';
}

It should work (not tested).

ko ko 97 Practically a Master Poster

I'm not sure what's the problem ? I don't get any problem. Is it not working ?

ko ko 97 Practically a Master Poster

Oop ! Sound likes suck! But, you're right. :) Thanks for alert @blocblue.

ko ko 97 Practically a Master Poster

str_pos() returns boolean (TRUE or FALSE). Should be

if (strpos($html->href, 'http://') !== FALSE) {
    //there is http in the url, then do this statement
    // your code
}

Or use @diafol method.

ko ko 97 Practically a Master Poster

Remove your scripts and just check mine, and then, alter those codes according to your needs. You've wrong syntax and also I can't tell without seeing your HTML.

ko ko 97 Practically a Master Poster

With my thought, better pick up a CSS framework such Twitter Bootstrap or 960.gs would help you to make your template easily with their default CSS properties in a short while. You can also try free CSS templates to download into your PC and customize those templates according to your needs. Or post your web site link here and then, no one need to download your CSS and everyone can see your CSS via their browser view source and they can also fix your CSS bugs and let you know what you need to do. Good luck. Table layout sucks yet! :)

ko ko 97 Practically a Master Poster

Here is my script and markup with your getCookie and setCookie functions. It does work properly.

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title> - jsFiddle demo by wasimkazi</title>
    <style type="text/css">
    <!--
    body {
        color: #171717;
        font: 11pt/14pt Arial, Tahoma, Sans-serif;
    }
    h3 {
        font-size: 11pt;
        margin: 0 0 10px;
        padding: 0;
    }
    p {
        margin: 0;
    }
    #boxes {
        margin: 2em;
        width: 300px;
    }
    .button {
        background: #f2f2f2;
        border: 1px solid #aaaaaa;
    }
    .button span {
        cursor: pointer;
        display: block;
        font-weight: bold;
        padding: 0.4em 1em;
    }
    .box {
        border-color: #aaaaaa;
        border-style: none solid solid;
        border-width: 1px;
        display: none;
        margin-bottom: 1em;
        padding: 1em;
    }
    -->
    </style>
    <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
    <script type='text/javascript'>//<![CDATA[ 
    function getCookie(c_name) {
        var i, x, y, ARRcookies = document.cookie.split(";");
        for (i = 0; i < ARRcookies.length; i++) {
            x = ARRcookies[i].substr(0, ARRcookies[i].indexOf("="));
            y = ARRcookies[i].substr(ARRcookies[i].indexOf("=") + 1);
            x = x.replace(/^\s+|\s+$/g, "");
            if (x == c_name) {
                return unescape(y);
            }
        }
    };
    function setCookie(c_name, value, exdays) {
        var exdate = new Date();
        exdate.setDate(exdate.getDate() + exdays);
        var c_value = escape(value) + ((exdays === null) ? "" : "; expires=" + exdate.toUTCString());
        document.cookie = c_name + "=" + c_value;
    };
    $(document).ready(function(){

        if(getCookie('openbox'))
        {
            $('#' + getCookie('openbox')).slideDown('fast');
        }

        $('.button').click(function(o){
            var obj = $(this);
            $('.box').slideUp('fast', function(){
                $(obj).next('.box').slideDown('fast');
                var openBoxID = $(obj).next('.box').attr('id');
                setCookie('openbox', openBoxID);
            });
        })
    });
//]]>  
</script>
</head>
<body>
    <div id="boxes">
        <div class="button"><span>Box 1</span></div>
        <div class="box" id="box1">
            <h3>Box 1</h3>
            <p>Box 1 content.</p>
        </div>
        <div class="button"><span>Box 2</span></div>
        <div class="box" id="box2">
            <h3>Box 2</h3>
            <p>Box 2 content.</p>
        </div>
    </div>
</body>
</html> …
ko ko 97 Practically a Master Poster

If I am not wrong, toFixed() must be custom javascript function which fills zero to float number with one position. You can pass the current value within that function and assign to variable as new value. Like

amount += parseFloat($(this).metadata().amount);
amount = toFixed(amount);
ko ko 97 Practically a Master Poster

Try to read the text file via php and echo out instead of using 'include()' function to show the text file.

<?php include($datadir."file_date.txt"); ?>

Instead

<?php include($data_dir . 'read_data.php'); ?>

Read the text file and echo the result in 'read_data.php'. Set file permission for that text file to 755 would be better.

ko ko 97 Practically a Master Poster

It may be cache. Better check file_date.txt directly.

ko ko 97 Practically a Master Poster
var_dump($arraydata['newda']);

How look like the above value before json_decode() function ? It contains any slash or escape ?

ko ko 97 Practically a Master Poster

Echo $rs_insert_scan before mysql_query() statement and see what returns. Is it the right query syntax what you're expecting ?

ko ko 97 Practically a Master Poster

Mark as Solved then.

ko ko 97 Practically a Master Poster

Well. No one listen to the forum rules. You might mark as Solved when your problem was solved.

ko ko 97 Practically a Master Poster

Solved ? Marked it as Solved then.

ko ko 97 Practically a Master Poster

Probably, you may have XMLHTTPRequest problem. Are you sure crearXMLHttpRequest() works on IE and you get new XMLHTTPRequest ? Should try what @pritaeas said.

ko ko 97 Practically a Master Poster

Check RegEx.

ko ko 97 Practically a Master Poster

You must use HEADER with proper MIME type to prompt the download immediately when you click the download button. The above @tyson567 methods just send you the new page where the image located, it'll not prompt you to download the image when you reached that page. Here is the example for method 1. The method 2 can be done with Javascritp or jQuery plugin. You just need to google for that.

ko ko 97 Practically a Master Poster

It's not notepad what @veedeoo is mentioning. Notepad is not good IDE to write the code or any programming language. You should use another IDE which has more features and good supporting for multiple programming languages such as PHP, HTML, ASP or Java. Here are some good tools you should try. Notepad++ ( http://notepad-plus-plus.org/download/v6.1.3.html ), SublimeText2 ( http://www.sublimetext.com/2 ), AptanaStudio3 ( http://www.aptana.com/products/studio3/download ). I prefer to use Notepad++ and SublimeText2 rather than AptanaStudio3. These two IDEs are comfortable with small projects like PHP, HTML, Javascript and any web development.

ko ko 97 Practically a Master Poster

Only submit button should be identified for one form. No matter how much submit buttons are you using within the same form, they've only submission of that form.

Try what @Glider Pilot mentioned above.

ko ko 97 Practically a Master Poster

datatype: 'json', should be dataType

ko ko 97 Practically a Master Poster

Post the error what you're getting. Actually, you need web server and MySQL for installing Magneto.

ko ko 97 Practically a Master Poster

There is no one who write the code for you. Post what you've and what you got. We'll point you the correct way.

ko ko 97 Practically a Master Poster
<?php
mysql_connect("localhost", "root", "test") or die(mysql_error());
echo "Connected to MySQL<br />";
mysql_select_db("testdb") or die(mysql_error());
?>


<?php

@$username = $_POST['name'];
@$country = $_POST['country'];


?>

Put this in form.php, remove include(form.php) and try. If you want to show the form again. Redirect to that page when the INSERT finished with custom message, FAILS or SUCCESSES. There is a lot of tutorials on the internet. You can google for that.

ko ko 97 Practically a Master Poster
<?php
phpinfo();
?>

What does it return ? Also, don't put the bracket with echo statement.

<?php
echo "Hello";
?>

It should be.

ko ko 97 Practically a Master Poster

You might have wrong db structure.
Separate the user table and order table. User table should has ID numbers, names and ordered. Also, order table should has ID numbers, names and quantities.

For example, if one user click cheese to order, then update the ordered field (insert the ID number of the ordered item) from user table where username/id is the user/user's id who made the order. If the user made more than one orders, you can store the id numbers of the ordered item together with comma (1,2,3 etc).
And then, you might update quantities field from order table where the field 'quantities' is Cheese. So, you can analyze how many orders exist for each item. Once, the user has finished the ordered process or logged out without finishing the order process, you must remove the order from that user.

Hope this help.

ko ko 97 Practically a Master Poster
[B]$qtyProd= $_POST['qtySelectProd'];[/B]

- Where is qtySelectProd in the form ? I don't see that field in the form.
- qtySelectSer, you have only qty value qtySelectSer, check your HTML option value within the loop.

for ($n=0; $n<11; $n++){ echo "<option value=qty>".$n."</option>";
}

ko ko 97 Practically a Master Poster

Solved ? If then, mark as Solved.

ko ko 97 Practically a Master Poster

Post the codes in site.php.

ko ko 97 Practically a Master Poster

Try this:

if(isset($_POST['firstName'] && $_POST['lastName'])) {
$text=$_POST['firstName']." ".$_POST['lastName'];
$to="anubhavjhalani09@gmail.com";
$subject="Message from php";



//data insert into database
$sql="INSERT INTO entries (contents)
VALUES
('$text')";

echo $text;
}
ko ko 97 Practically a Master Poster

Did you include db_connection.inc file into db_connect.inc ? Perhaps, like below:

<?php
include('db_connection.inc');

function db_connect ()
  {
  include'db_connection.inc';
  $dbh = new PDO("mysql:host=127.0.0.1;$database", $user, $password);
  return ($dbh);
  }
?>
ko ko 97 Practically a Master Poster

First, check your mysql server is running or not like @ardav mentioned?
Second, how are you using mysql_connect() function in your php? mysql_connect() needs three arguments (host, username, password).

Check the above facts and post again if your problem still keep going.

ko ko 97 Practically a Master Poster

Then, mark as Solved with the link below the editor.

ko ko 97 Practically a Master Poster

Try this:

<?
if (isset($_POST['Submit'])){
 
	$fd = fopen ($form_data, "r");

	while(!feof($fd)) {
		$line = fgets($fd);
		
		list($data[$counter]->name, $data[$counter]->pass) = explode(',', $line);
		$counter++;
	}

	fclose ($fd);

	foreach($data as $user) {
		$sql = "INSERT INTO `table_name` (`field_1`, `field_2`)
				VALUES('$user->name', '$user->pass')";
		mysql_query($sql) or die('Cannot insert the data. Error: ' . mysql_error());
	}
}
?>
 
<form method="post" action="" enctype="multipart/form-data">
 
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<br>File to upload:<br>
<input type="file" name="form_data" size="40">
<p><input type="submit" name="Submit" value="Submit">
</form>

Not tested ! Post again if there is still problem with the above codes.

ko ko 97 Practically a Master Poster

Post the code.

ko ko 97 Practically a Master Poster

Probably, $get has NULL. Check the query again. And are you sure that the connection succeed ? Make sure your mysql_connect passed or not. Anyway, use the error handler.

mysql_connect($host, $user, $pass) or die('Couldn\'t connect to MySQL. Error: ' . mysql_error());

SELECT * FROM songs, check this query manually in PHPMyAdmin via the browser.

ko ko 97 Practically a Master Poster

The error is missing close bracket in somewhere. Maybe, line 715 and above. Check all line 1 to 715, all bracket are closing properly.

ko ko 97 Practically a Master Poster

Mark as Solved, if your problem solved.

ko ko 97 Practically a Master Poster

Check $num3, by echoing or using var_dump($num3). If it has non-zero value (1,2,3,...), the query is ok. Otherwise, check you've table named 'tbl_tour_profile', and ensure that the table name also corrected.

ko ko 97 Practically a Master Poster

Use CODE tag to wrap the codes.

ko ko 97 Practically a Master Poster

Wrap your codes with CODE tag.

ko ko 97 Practically a Master Poster

There is a plenty of javascript slider plugin written by multiple framework such jquery, mootools, dojo, prototype, and so on.

You can google that.

CSS3 can't support in all browser especially IE 8 and minor version. If you don't mind with IE, you can use it. Most of the modern browsers support CSS3 very well.

ko ko 97 Practically a Master Poster

You must register the domain name first, and you must point your host (ie, your web server) with that domain. You can easily done with your domain panel. Furthermore, you might have already setup DNS on your server, which will handle the domain/IP forward and reverse look up.

You need to ask help from any network pro, and they will keep your work on straight forward quickly.

Hope this help.

ko ko 97 Practically a Master Poster
if(file_exists($filepath)) {
die('File exists');
} else {
die('File doesn\'t exist');
}

This may be better format comparing the return value as boolean (true). The '$filepath' might be the absolute or relative path including file name and extension.

What's the problem you're facing ? What do you mean that function does not work correctly ? Any error you get, then, post the error message.

ko ko 97 Practically a Master Poster
ko ko 97 Practically a Master Poster

Use POST method. Never use GET with user informations. Remove the bracket at line 23.

$photo = ($_FILES);

Use instead above:

$photo = $_FILES['photo']['name'];
ko ko 97 Practically a Master Poster

Use POST method. Never use GET with user informations. Remove the bracket at line 23.

$photo = ($_FILES);

Use instead above:

$photo = $_FILES['photo']['name'];
ko ko 97 Practically a Master Poster

Check the opening and closing of bracket '{}'. And make sure that all are properly nested.

It may due to the error above the line 15. It is helpful if you post the complete codes.

ko ko 97 Practically a Master Poster

Line 85:

$copied = copy($_FILES['image']['tmp_name'], $newname);

Use below instead of above.

$copied = move_uploaded_file($_FILES['image']['tmp_name'], $newname);
ko ko 97 Practically a Master Poster

Try this.

<?php 

// Made by Shahbaz Singh July 2011. All Rights Reserved. Webdhaba.in

$q = $_GET["q"];

$db_host = "localhost";
// Place the username for the MySQL database here
$db_username = ""; 
// Place the password for the MySQL database here
$db_pass = ""; 
// Place the name for the MySQL database here
$db_name = "test";

// Run the connection here 
mysql_connect("$db_host","$db_username","$db_pass") or die ("could not connect to mysql");
mysql_select_db("$db_name") or die ("no database");
$sql = mysql_query("SELECT * FROM people WHERE name LIKE '%$q%'");

$num_results = mysql_num_rows($sql);
if($num_results > 0){
	$count=0;
	while($row = mysql_fetch_array($sql)){
		
		$users[$count]->name = $row["name"];

		$users[$count]->id = $row["id"];

		$default_pic = "people/$id/image01.jpg";

		$no_pic = "people/0/no_image_pic.jpg";

		if (file_exists($default_pic)) {
			$image = "$default_pic"; 
		} 
		else {
			$image = "no_pic";
		}
		$users[$count]->avatar = $image;
		
		$count++;
	}
	
	$output = "<table border='0' width='100%' cellspacing='0' cellpadding='0' >
	<tr>
		<td colspan='2' height='24' >
		<p align='center'><b><font face='Arial' size='2'>Search Results</font></b></td>
	</tr>";
	
	foreach($users as $user){
	
		$output .= "<tr>
			<td width='67' >
			<b><font face='Arial' size='2'>
			<img border='0' src='$user->avatar' width='86' height='86'></font></b></td>
			<td width='967' >
			<b><font face='Arial' size='2'>&nbsp;&nbsp;&nbsp; 
			<a href='people.php?id=$user->id"'>
			<span style='text-decoration: none'>$user->name
			</span></a></font></b></td>
			</tr>";
	}
}
else {
	$output = "<table border='0' width='100%' cellspacing='0' cellpadding='0' >
	<tr>
		<td colspan='2' height='24' >
		<p align='center'><b><font face='Arial' size='2'>Search Results</font></b></td>
	</tr>
	<tr>
		<td align='center' width='100%' >
		<font face='Arial' size='2'><br><br><br>Sorry, no results could be found.
		</font></b></td>
		</tr>";
}
$output .= "</table>";
?>
?>

Not tested yet. You may encounter the errors. If you got something wrong. Post here.

Hope this help.