ko ko 97 Practically a Master Poster

Remove white space from this line.

$sql = " UPDATE coupons SET coupon_used= '0' WHERE coupon_code = '$submit' ";

Should be

$sql = "UPDATE `coupons` SET `coupon_used` = '0' WHERE `coupon_code` = '$submit'";

And print the above the query line, copy and past it into phpMyadmin and run it manually, and check how it works.

ko ko 97 Practically a Master Poster

Post your code briefly here.

ko ko 97 Practically a Master Poster

Upload to where ? You've not upload to any destination. You've need 'move_uploaded_file' function to store the image from the temp directory to destination folder which you want to store. Example like below

move_uploaded_file('image_name', 'destination');

The complete info here.

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

Check line number 9 in coupon.php.

' ' . htmlspecialchars($_GET["coupon"]) . '';

What is this ? Perhaps, you should have.

$coupon = htmlspecialchars($_GET["coupon"]);

And then, if...else statement should go like below

if($coupon == ''){
echo "<h2>The request is invalid</h2>";
}
else{
$coupon_code = $coupon; 
}

And the final one is, print_r in input field. Line 19 in coupon.php.

<input type="text" name="couponcode" disabled value="<? print_r ($coupon_code); ?>">

Replace above with:

<input type="text" name="couponcode" disabled value="<?php echo $coupon_code; ?>">

'<? ?>', may be the problem, you must enable to support this syntax in php.ini file.

ko ko 97 Practically a Master Poster

You'll see does your code invalid or not. http://validator.w3.org/.
As drjohn state, you must have some basic knowledge with HTML, CSS and their standards which are standardizing by W3C.

ko ko 97 Practically a Master Poster

Use 'z-index'. Determine which layer is front and which is bottom.

ko ko 97 Practically a Master Poster

What's your problem ? Post something such question about what you want. It is rather helpful than asking your whole question in post title.

ko ko 97 Practically a Master Poster

SPAN is inline element and DIV is block. Inline element cannot contain block-level elements whether block-level element can contain both block and inline elements. Try to alter way to use.

ko ko 97 Practically a Master Poster

Post that 'sqlpage.php'.

ko ko 97 Practically a Master Poster

Check line 11 and 12. You use post method in form. But, you get with GET method.

if($_GET){ //gets userid
$friend_id=$_GET;

ko ko 97 Practically a Master Poster

Post index.php you've problem.

ko ko 97 Practically a Master Poster

Try this

<?php 
 if(isset($_GET["id"])){
	if($_GET["id"] == "web"){
  echo "<link rel='stylesheet' href='css/style.css' media='screen'/>";
	echo "<link rel='stylesheet' href='css/style.css' media='handheld, only screen and (max-device-width:480px)' />";
	echo "<meta name='viewport' content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;' />";
 } else {
  echo "<link rel='stylesheet' href='css/style.css' media='screen'/>";
	echo "<link rel='stylesheet' href='css/iphone.css' media='handheld, only screen and (max-device-width:480px)' />";
	echo "<meta name='viewport' content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;' />";
	}
 }
?>
ko ko 97 Practically a Master Poster

Are you meaning hidden files ?

ko ko 97 Practically a Master Poster

It's not important if the user turn-off javascript or not. You might check from the server-side at least for the security reasons like mysql injection.

Xufyan commented: xufyan :) <3 +3
ko ko 97 Practically a Master Poster

@britoniah3480. I don't mind that :)

@IIM, does it solve ?

ko ko 97 Practically a Master Poster

I removed it. You can't see now. How I was stupidity man just to show this app without thinking any further security problem. Yeah, it is very very dangerous to let users to put their PHP codes on my server and allow to run.

@britoniah3480, it's not for fun. I know that I became how bloody fool guy for exposing my secrets to the people all around the world. I'm just showing you all one of my amateur project. It's a very very bad app too till it was an amateur one. Now, I got one more knowledge and perhaps you too from this matter.

@ardav, it's not enough for you to thanks only with private message. So, I say 'Thanks you' here again. And accept my reputation++. :)

ko ko 97 Practically a Master Poster

I made like this one. You can check here.
You can write your raw PHP left side and when you clicked 'Run', the code will process and will display as a result at the right side. But, it's not professional. Just amateur.

ko ko 97 Practically a Master Poster

[name] => Infinite Lives
[0] => 8001E096 0007

You put both numeric and associative in same matter. It is the problem.
Why your one array key is associative type and other numeric ? Try to build the array structure.

ko ko 97 Practically a Master Poster

"SELECT account_details.full_name, account.account_balance ".
"FROM account_details, account ".
"WHERE account_details.account_number = account.account_number";

Check this query manually in phpMyAdmin. If 0 row returns, the problem is no account in table.

ko ko 97 Practically a Master Poster

This is PHP forum. You question rather like Javascript. Move to Javascript forum.

ko ko 97 Practically a Master Poster

Do as @twiss said, or escape it.

$result = $xml->xpath('div[@id=\'player\']');
ko ko 97 Practically a Master Poster

Here is complete resources about PHP.
http://www.php.net

ko ko 97 Practically a Master Poster

Your codes are so clutter. I can't read well. And wrap the codes with code tag which provided on the toolbar (CODE) button.

The error says 'mysql_connect()' failed at called, which maybe wrong host, username, password. Check the host, username, password for that database you're using, and put the correct info.

ko ko 97 Practically a Master Poster

Why not <hr /> ?

ko ko 97 Practically a Master Poster

No 'absolute' for layout structure. Try to alter another way.

ko ko 97 Practically a Master Poster

Read again the documentation. We've no use in this plug-in. so, we can't know how it suppose to work.

ko ko 97 Practically a Master Poster

Slashes are special characters in PHP. I think you should escape the slashes.

define("SITE_PATH", "D:\\Hosting\\6585577\\html\\rhythmmovement\\");

It can work both.

ko ko 97 Practically a Master Poster

Where your images are storing ? Are they same root of that PHP file ? If not, put the absolute path or relative path like below:

echo "<img src=\"http://yoursite.com/images/avatar/".mysql_result($userg,0,"avatar" )." width=\"200\" height=\"200\">";

By the way, don't post many thread with the same case.

ko ko 97 Practically a Master Poster

It may sound like you need to involve the WP framework and their functions indeed. I've not seen if there is custom function working on the WP framework. Even if you can do, it is hard to compatible with WP and will cause may bugs.
Better way, see the WP function references and you should find the solution there. WP show all function references on their official website.

ko ko 97 Practically a Master Poster

Where did you want to do that process ? You've not FORM already within your HTML, which means that how do you pass these drop-down value and process that ?
Perhaps, it may not what you want. But try this:

<!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=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<div>
<form name="colorswithcher" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<select name="color[]" size="6" multiple="multiple">
<?php 
$colors = array("BLUE", "GREEN", "RED", "YELLOW", "WHITE");
?>
<?php 
if(isset($_POST['changecolor'])){
$sel = (array) $_POST['color'];
$top="";
$bottom="";
$separator = '<option value="" disabled="disabled">Select</option>';
	foreach($colors as $value=>$label){
		if(in_array($value, $sel)) {
			$top .= '<option value="' . $value . '">' . $label . '</option>';
		}
		else{
			$bottom .= '<option value="' . $value . '">' . $label . '</option>';
		}
	}
	echo $top . $separator . $bottom;
}
else{
	foreach($colors as $value=>$label){
		echo '<option value="' . $value . '">' . $label . '</option>';
	}
}
?>
</select>
<br />
<input type="submit" value="Change Color" name="changecolor" />
</form>
</div>
</body>
</html>

@ardav already showed good method, and I used it inside it. If your problem solved, @ardav solved you properly than me.
Hope this help!

ko ko 97 Practically a Master Poster

Solved ? Mark as 'Solved' with the below link like 'Marke as Solved Thread' or somethign similar.

ko ko 97 Practically a Master Poster

<form id="form1" name="form1" method="post" action="changepassword.php">

What for that file ? You've all the snippets for that process in the same file. Is not it ?
Perhaps, your problem due to

<form id="form1" name="form1" method="post" [B]action="changepassword.php"[/B]>

How is it with this one:

<form id="form1" name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
ko ko 97 Practically a Master Poster

@twiss, thanks man. You're right, I forgot it.

ko ko 97 Practically a Master Poster

URL variable ? You mean 'www.xxx.com?data1=php&data2=language' like this ?
You can retrieve the parameter passed by URL with `$_GET[]` method. With above example

$data1 = $_GET['data1']; //assign 'php' from url
$data2 = $_GET['data2']; //assign 'language' from url

Perhaps, I'm wrong.

ko ko 97 Practically a Master Poster

OK. I'm not XML expert. But I can do a little bit like following.

<?xml version="1.0"?>
<book>
    <title>XML</title>
    <price>$3.0</price>
</book>
<book>
    <title>HTML</title>
    <price>$4.0</price>
</book>

As understanding your table, you've only two title, and price for each book. You can add addition element such <isbn>23232</isbn><published_date>Jun-28-2012</published_date> , ISBN number and the published date of the book as you like.
Hope that it will appreciate for you.

ko ko 97 Practically a Master Poster

I'm not sure but do you want this table as XML structure ? XML is not like HTML, XML has not fixed predefine tags whether HTML has. You must define your own tag that related with the type of the data as much as you need.
Is that what you want, @twiss link would be appreciate for you, because you'll need to learn.

ko ko 97 Practically a Master Poster

Post you code here.

ko ko 97 Practically a Master Poster

Codes are so messy. Use period (.) for string concatenation, not comma (,). And also escape the special character when mix-used with javascript parameter like onmouseover="cancelHide(\'one\')" . Escape the single-quote while you're using single-quote, if you use double-quote, escape double-quote in reverse case. Try with below:

foreach ($menu->categories as $category) {
		$class = ($category['first']) ? ' class="first"' : '';
		echo '
   			<ul><li'. $class .'><a href="'. $category['url'] . '">'. $category['title'] . '</a></li>';
	} // foreach
	
		echo '    
		<dl class="dropdown2">
		<dt id="one-ddheader" onmouseover="ddMenu(\'one\',1)" onmouseout="ddMenu(\'one\',-1)">
		<a href="javascript:void(0);">More...</a>
		</dt>
		
		<dd id="one-ddcontent" onmouseover="cancelHide(\'one\')" onmouseout="ddMenu(\'one\',-1)">
		<ul><li' . $class . '><a href="' . $category['url'] . '">' . $category['title'] . '</a></li></ul>
ko ko 97 Practically a Master Poster

You tested with what ? This one ?

$html->find('$html->find('#divid');');
$html->find('div[id=divid]');

Does it correct use ? In my opinion, your class wont' work while it is quoting, the first line. Furthermore, why the class is inside the same class as parameter.

Perhaps, you would not probably well read the instruction. I don't know what that snippet would suppose which function.

ko ko 97 Practically a Master Poster

This is not Javascript forum. Move your thread to Javascript forum.

ko ko 97 Practically a Master Poster

'session_start()' requires on your page. But, it might be the first before output any HTML or processing PHP codes.

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

You're not preventing the SQL injection. You're probably encrypting the data.

ko ko 97 Practically a Master Poster

I suggest to use standard mode, i.e., 'selected' should be 'selected="selected". But, what for '--Select--' when there is already the default selected item, 2012 for now.

ko ko 97 Practically a Master Poster

Well, you can use both whenever you want. But, they've different response. For example:

$name = 'John';
echo 'My name is $name';     // returns My name is $name
echo "My name is $name";     // reutnrs My name is John
echo 'My name is ' . $name;  // with single-quote, variable should be outside and concatenate with period (.). In this case, My name is John will return

As, you see above, single-quote returns the raw data if you delimit the variable with single-quote, whether double-code returns the processed data.

I'm not expert in this case. But I have to suggest like that.
If you have double-code in value, quote with single-quote otherwise double-quote in similar case.

Hope this help!

ko ko 97 Practically a Master Poster

Wrap your codes with code tag, that is providing on the toolbar with the button (CODE).

ko ko 97 Practically a Master Poster

Sorry! It is wrong. Here is correct one.

$sql .= ($i == (count($check)-1)) ? " `$check[$i]`" : " `$check[$i]`,";

Echoing the query string on the browser, before executing is good practice. You'll see your query is properly collect or not. And you can copy and paste this string into your phpMyAdmin and can see how the query shows.
Hope this help!

ko ko 97 Practically a Master Poster

Group the checkbox with the unique name like @IIM method. But, you don't need many query within the loop. It is unnecessarily extra process. Try this:

if(isset($_POST['submit'])){
	$sql = "SELECT";
	$check = (array) $_POST['a'];
	for($i = 0; $i < count($check); $i++) {
		//assign the query string
		$sql .= ($i <= count($check)) ? " `$check[$i]`" : " `$check[$i]`, ";
	}
	//concatenate the require strign for query
	$sql .= " from tbl_hindi";
	//execute the query
	$query = mysql_query($sql);
}

As you see, the query string will concatenate within the loop with the amount of the check-box which are already checked by the users. There is no problem even if you don't have 'SELECT *', when all check-boxes was checked. In this condition, the query string will be

SELECT `name`, `address`, `mobile`, `dob`, `namdan_date`

. It's similar to 'SELECT *' if your table was built with these fields.
Also, line 11, you've this code.

<form name="myform" action="<?php $_SERVER;?>" method="post">

<?php $_SERVER['PHP_SELF'];?> should be <?php echo $_SERVER['PHP_SELF'];?>

IIM commented: Nice work...i was thinking something similar but can't conclude to exact point.... +2
ko ko 97 Practically a Master Poster

If solved ? Then mark it as 'Solved' with below link 'Mark as Solved' or something similar.

ko ko 97 Practically a Master Poster

Well @IIM, thanks for spotting the errors.
@gotboots, use the query string as shown by @IIM. And put the 'mysql_query()' funtion.

$query = mysql_query($sql);
if(!$query){
   die('Update failed!. Error:' . mysql_error());
}