ko ko 97 Practically a Master Poster

Now, the name array has all matches with the keyword that the user search. Echo out the name with for loop.

for($i=0;$i<count($name);$i++){
      echo $name[$i] . '<br />';
}

You can also use 'foreach' method.

foreach($name as $user) {
       echo $user . '<br />';
}

Hope this help.

ko ko 97 Practically a Master Poster

You should use array to get the data withing the loop. If not, the second will override the first and the third will override the second and so on. Finally, you would have only result, the last one. Check Line 25,

$name = $row["name"];

Should be

$name[] = $row["name"];

All names will store in $name array match with your search keyword. If you have another variable to store like this, change it to array too.

ko ko 97 Practically a Master Poster

What does the error show ? However, you will not get any value with $_GET. You was using 'uid' in the url. I'm not sure, without seeing your error status. Perhaps, it may solve your problem. Replace line 15 in profile.php with the line below.

$id = $_GET['uid'];

Hope this help.

ko ko 97 Practically a Master Poster

No worry about that. Post this thread to PHP. Your problem is inclusive in PHP even if there is no wordpress or htaccess forum. Indeed, they are involving with PHP.

ko ko 97 Practically a Master Poster

You cannot control background size with CSS. Apparently, your problem kinda looks like position problem.

.samplebody{
	  background:url('images/port1.jpg');
	  background-size:1024px;
	  background-repeat:no-repeat;
          background-position: top center; /* Adjust the position yourself */
	}

Hope this help.

ko ko 97 Practically a Master Poster

It is server-side problem. Better ask on PHP forum. Move this thread to PHP forum.

ko ko 97 Practically a Master Poster

What is the problem ? What do you want to do with the above codes ? Your post is not clear. Be more precise and tell us what do you want to do.

ko ko 97 Practically a Master Poster

You need to post the original start of $coupon_code.

ko ko 97 Practically a Master Poster

Array ( [usecode] => Use Coupon )

As you posted above. $submit has wrong value stored. Check where $submit comes from.

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
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

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

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

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

Do as @twiss said, or escape it.

$result = $xml->xpath('div[@id=\'player\']');
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

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

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());
}
ko ko 97 Practically a Master Poster

You've not execution query.

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

This one is more clear format.

$sql = "UPDATE `my_db` SET `date_in` = '$today', `customer_name` ="$customer_name", `billing_address` = '$billing_address', `billing_suburb` = '$billing_suburb', `billing_city` = '$billing_city', `same_as` ='$same_as', `shipping_address` = '$shipping_address', `shipping_suburb` = '$shipping_suburb', `shipping_city` = '$shipping_city' WHERE `personID` = '$select'";

Hope this help.

ko ko 97 Practically a Master Poster

As I mentioned above, it is not quote ('account_type', 'fd_period', 'account_number').
It is groove symbol that is left side of the numeric key 1, mostly known as tilde key.
Copy below and paste in your file:

$query = "UPDATE account SET `account_type` = '$account_type', `fd_period` = '$fd_period' WHERE `account_number` = '$account_number'";

Use single-quote ('') for the value. If not, escape them with slash (\"\").
Hope this help.

ko ko 97 Practically a Master Poster

Show that line 72 in account.php.

ko ko 97 Practically a Master Poster

What error ?

ko ko 97 Practically a Master Poster

Not same like yours.

SET `account_type` = '$account_type'

Use (``) symbol left side of the numeric key 1 for the field name. Use quote ('') for the value.

ko ko 97 Practically a Master Poster

ႊႊThen, it solved ? If so, mark as Solved with below link.

ko ko 97 Practically a Master Poster

$query = "UPDATE account SET 'account_type' = '$account_type', 'fd_period' = '$fd_period' WHERE 'account_number' = '$account_number'";

Replace with

$query = "UPDATE account SET `account_type` = '$account_type', `fd_period` = `$fd_period` WHERE `account_number` = '$account_number'";

It is not quote. It is groove left side of the numeric key 1.

ko ko 97 Practically a Master Poster

What value are you meaning ? This one $sector=$_GET['sec']; ?
Your question is not clear.

ko ko 97 Practically a Master Poster

Build the require fields in the form. PHP is also ok. You need to put the fields that would process by PHP.

$info = array(
'nic' => $_POST["nic"],
'full_name' => $_POST["full_name"],
'name_with_initials' => $_POST["name_with_initials"],
'phone_number' => $_POST["phone_number"],
'address' => $_POST["address"],
'gender' => $_POST["gender"],
'date_of_birth' => $_POST["date_of_birth"],
'account_type' => $_POST["account_type"],
'fd_period' => $_POST["fd_period"]
);

You must have fields for the above array.

ko ko 97 Practically a Master Poster

I started from there.http://www.html.net/
And here is the good place for CSS design www.csszengarden.com.

Start from basic, and go professional. Below is the simple road map.
HTML+CSS+Js => PHP/ASP.Net/JSP/Framework

Enjoy with your learning.

ko ko 97 Practically a Master Poster

If you learn PHP without HTML,CSS basic, then, you would have problem in the development cycle.

ko ko 97 Practically a Master Poster

As @twiss says, position the image on this place and attach the event to the image. Just simple CSS.

ko ko 97 Practically a Master Poster

$query = "UPDATE account SET `account_type` = '$atype', `fd_period` = 'fdper' WHERE `account_number`= anum";

Are you using this statement ? 'anum' should be '$anum'.

diafol commented: good spot +13
ko ko 97 Practically a Master Poster

Is '$pd_image' already has absolute URL including your host, domain (e.g., www.example.com/images/image.jpg).If so, let me do it:

<img src="http://www.example.com/resize.php?width=180&height=180&image=<?php echo $pd_image; ?>" alt="<?php echo $pd_name; ?>" />

The above should work if '$pd_image' has absolute path to the image (eg.,http://www.example.com/images/). If not concatenate it by following:

<img src="http://www.example.com/resize.php?width=180&height=180&image=http://www.example.com/<?php echo $pd_image; ?>" alt="<?php echo $pd_name; ?>" />

You're wrong way to use: resize.php?<?php echo $pd_image; ?>? The image file only need to pass after 'image=' parameter.

ko ko 97 Practically a Master Poster

Mark-up are also messed. Fail DTD http://validator.w3.org.
'<li>' tag is outside of the '<ul>' at line 99. But, I don't think so that probably make the layout flew.
Validate your CSS here.

ko ko 97 Practically a Master Poster

It doesn't work with relative URL, I tested it. Use by following.

yoursite_url/resize.php?width=180&height=180&image=yoursite_url/image_path/image

No slash '/' after the 'resize.php'. Use '?' and parameters follow by that. The above is correct way.
Hope this help.

ko ko 97 Practically a Master Poster

@MrDJK, you're right.
@Jaklins, IE has different known for MIME-TYPE. You'll probably know that echo the file type. IE shows 'jpg' as 'pjpeg' and 'png' as 'x-png'. So, the upload will be done with adding a few lines for those MIME types.

$_FILES["fileField"]["type"] == "image/pjpeg" //for jpeg, and jpg
$_FILES["fileField"]["type"] == "image/x-png" //for png

Hope that solve, and credit to MrDJK.

MrDJK commented: Thanks for elaborating more. (: +1
ko ko 97 Practically a Master Poster
ko ko 97 Practically a Master Poster
ko ko 97 Practically a Master Poster

Copy this file to your site and keep under your web folders anywhere. For example, you named this file to 'resize.php' and keep it under the main root. Then call this file with the following:

http://www.yoursite.com/resize.php //absolute path
resize.php                         //relative path

Then, hook with your image as parameter including width,height (etc.), following the references on their site. As following your codes:

<td cless="productWrap">
<td class="productItem" style="opacity: 1;">
<a class="productImage" href="<?php echo $pd_image; ?>" rel="prettyPhoto" title="<?php echo $pd_name;?>" style="opacity: 1;">
<img src="http://www.yoursite.com/resize.php/<?php echo $pd_image; ?>?width=180&height=180&image=<?php echo $pd_image; ?>" alt="<?php echo $pd_name; ?>">
</a>
</td>

You can test manually on the browser with the following URL: http://www.yoursite.com/resize.php/yourimage.jpg?width=110&height=110&image=path_to_image/image.jpg Hope this help!

ko ko 97 Practically a Master Poster

You may not need to create thumbnails, you can crop the image how much as you need. And you don't also need to include/import any file inside your page. Check out here.

Hook your image with the file and it'll automatically crop your image as thumbnail without cloning or duplicating. Just simply hook with that file like:

<img src="http://yoursite.com/resizer.php?width=110&height=110" />

Easily customize your thumb size as well as you're.
Hope this help!

ko ko 97 Practically a Master Poster

The thing is, is there a more simple way for creating thumbnails without all of that files?

What do you mean for that question ? Another way to create thumbnail, perhaps with a few line codes ?

And what do you want to combine with those statements ?
Maybe, are you want to create multiple thumbnails and display in the page ?