ko ko 97 Practically a Master Poster

Go step by step. You should start with those comments in another php file and check all are properly work. Then, hook via ajax in another.

ko ko 97 Practically a Master Poster

Echo the value first, and ensure that the parameter takes the correct data. Put this line on the first line of 'Grade.php'.

echo $_GET['n1text'];

If it returns the correct value, then try with 'floatval()' and check again. Hope this help.

ko ko 97 Practically a Master Poster

Echo the value first, and ensure that the parameter takes the correct data. Put this line on the first line of 'Grade.php'.

echo $_GET['n1text'];

If it returns the correct value, then try with floatval() and check again. Hope this help.

ko ko 97 Practically a Master Poster

<input type="text" value="n1text">

Replace above with below one:

<input type="text" name="n1text">
almostbob commented: good eyes zero +13
Zagga commented: Well spotted +5
ko ko 97 Practically a Master Poster

onclick="getId(id)"

Missing argument. Put the value of id that was identified to accept the ajax result. Like this one:

onclick="getId('your_div_id')"
ko ko 97 Practically a Master Poster

Check out here.

ko ko 97 Practically a Master Poster
if(preg_match_all('/<img\s[^>]+>/', $content, $images)){
	var_dump($images);
}

It may help you or maybe I'm wrong.

ko ko 97 Practically a Master Poster

Use jquery more simple and clear. You should separate the reply form in another php file. When the user click the reply button, call ajax function to the file where the reply HTML form located. Here is my example:

$(document).ready(function(){
    $('.reply').click(function(){
         $.ajax({
                 type: "GET",
                 url: "reply.php",
                 data: "reply_id="+$(this).attr('id'),
                 success: function(data){
                           $(this).next().append(data);
                          }
               })
    })
})

@reply.php
<?php
$reply_id = $GET['reply_id'];
?>
<form name="replyform" method="post" action="replymessage.php">
<input type="text" name="reply<?php echo $reply_id; ?>" id="reply<?php echo $reply_id; ?>" />
<input type="submit" value="Reply" name="reply" id="reply" />
</form>

And attach the class to the handler element, the reply link.

<a id="{$msg['id']}}" class="reply" href="javascript:;">Reply</a>

With my example, you need only one form for reply. With your version, the server is generating the reply form followed by every reply links, and the server will also be generated the comment forms while the new comment have been created. It makes the file size larger and too much unnecessary HTML will be output. Hope that help.

ko ko 97 Practically a Master Poster

Maybe, 'setAttribute' and 'getAttribute' method you are meaning. These methods won't work on older IE version. Maybe, I'm wrong.

ko ko 97 Practically a Master Poster

Better post at HTML-CSS forum.

ko ko 97 Practically a Master Poster

Not smooth ? What does it mean ? It is working nicely in my PC.

ko ko 97 Practically a Master Poster

What can be done with your post ? The PHP statement cannot work inside the JS function. Javascript only work on browser (client), PHP work on server (web-server). You should make a function that collect the data and send this data to the php file that you want to process.

ko ko 97 Practically a Master Poster

You can use function and attach this function with 'click' event to that button you want to do this process. Post your codes is more appreciate to us.

ko ko 97 Practically a Master Poster

Maybe, your need is this one.

<script language="javascript">
function toggle(ele){
  var msgbox = document.getElementByID(ele.id);
  if(msgbox.style.display == "block") {
  msgbox.style.display = "none";
  ele.innerHTML = "Reply";
}
else {
msgbox.style.display = "block";
ele.innerHTML = "Hide";
}
} 
</script>

Hope this help.

ko ko 97 Practically a Master Poster
preg_replace('/(URL=http:\/\/).\s*?/', '', $your_url);

Not tested yet. You can use 'preg_replace' regular expression function, and google can help you more detail. Hope this help.

ko ko 97 Practically a Master Poster

Too much codes...! Please be precise and post the part of problem you think.

ko ko 97 Practically a Master Poster

Let us see your HTML.

ko ko 97 Practically a Master Poster

Better post at PHP or Javascript forum.

ko ko 97 Practically a Master Poster

Maybe you are right, or I am stupid writer. Yeah, some are using both fields. :)

ko ko 97 Practically a Master Poster

Maybe, file permission. Set the permission for that file '755'.
Hope this help.

ko ko 97 Practically a Master Poster

mysql_query("SELECT * FROM products WHERE `category` = "$POST" ORDER BY dateadded DESC");

I am not sure that you have category id or name in the product table. The category table and product must be related with each other like foreign key in one table and another in primary.

ko ko 97 Practically a Master Poster

$mark = mysql_query("select * from product order by product_id DESC");

Make ensure that the field names are correct (`product`, `product_id`). Recommend to do as hielo's way.

ko ko 97 Practically a Master Poster

Every programming languages have their own taste and own pretty structures. With my opinion, there is only two options. 1,) Programming for the windows application, 2.) Programming for the web application.

The number 1 is related with software engineering. You can choose many languages such C, C++, C#, Java, and so on. They are primarily pretend to develop the windows (desktop application).

The number 2 is related with web application development. Like software programming, you can choose multiple languages to develop the web application such as PHP, Ruby on Rails, Python, JSP, etc.

Yep, PHP is opensource and it is easy to use, and there are many PHP communities and they can help you to become a good PHP programmer in the short while. I am carzy in PHP too and that is why I am in PHP forum :). If you like web programmer, you must have a basic knowledge about HTML, CSS, Javascript, because they are foundation for the creation of the web pages. And you also need the database languages like MySql, MsSql, PostgreSql, etc. The database can help you to keep your data and you can in/out these data with one of the programming language (with my example, PHP).

So, what is in your mind ? Think about what you want to do and what is the best with your desire. We cannot choose for you. All we can do is just thinking for you and bring you approaching your goal.

ko ko 97 Practically a Master Poster

foreach($lines as $line){
$parts = preg_split("/:([^\/|^\\])/", $line);
$output .= "<tr>{$parts[0]}<td></td><td>{$parts[1]}</td></tr>";
}

Use below instead of above:

foreach($lines as $line){
$parts = preg_split('!\s*+[:]{1}\s!', $line);
$output .= "<tr>{$parts[0]}:<td></td><td>{$parts[1]}</td></tr>";
}

It should work. Hope this help.

diafol commented: a lesson in regex! :) +13
ko ko 97 Practically a Master Poster

Post your PHP.

ko ko 97 Practically a Master Poster

Try that:

HTML:

<div class="column">Column 1</div>
<div class="column">Column 2</div>
<div class="column">Column 3</div>

CSS:

.column {
     float: left; /* set the direction right/left you want to */
     width: 100px; /* Give the width for each column. Float needs static width, if not, it will cause many problems with the layout in some cases. */
}

Hope that help.

ko ko 97 Practically a Master Poster

You can use ':hover' CSS pseudo class for making the affect when the user mouse-over on that selector(s). You can use both

img:hover {statement}

or

a:hover img {statement}

. For the second case, the HTML image tag must be child of the HTML anchor tag, and it will be apply the statement with the parent anchor element was mouse-over by the user.

twiss commented: Erm, I think TS stated quite clearly that img is not a child of a? -1
almostbob commented: Actually the OP says nothing about the child state of the image, it would be functionally easier to assume the image is linkable, a child of the anchor +13
ko ko 97 Practically a Master Poster

Try with via Ajax.

almostbob commented: gentle, nice reply, I'm always ruder than that and upset people, +13
ko ko 97 Practically a Master Poster

Did you already declare '$parent_menu' correctly? The error means that there is no 'ecount' unique key in the '$parent_menu' at the location of '$row->parentId'. Check '$parent_menu' with 'var_dump($parent_menu)', and make sure that there is array rooms which are associated with the unique key 'ecount'.

ko ko 97 Practically a Master Poster

<input type="checkbox" onclick="selectinactivebatch(this.value);" id="inactive_batch" name="inactive_batch" <?php if(isset($_POST)) echo "checked";?>>

Where is the value of that checkbox ? You must have already put that checkbox value. Like:

<input type="checkbox" onclick="selectinactivebatch(this.value);" id="inactive_batch" name="inactive_batch" value="<?php echo $value; ?>" <?php if(isset($_POST['inactive_batch'])) echo "checked";?>>

Hope this help.

ko ko 97 Practically a Master Poster

Ensure that 'session_stat()' was in'success.php'.

ko ko 97 Practically a Master Poster

IE 7 and older cannot support pseudo element except anchor tags. Use black circle image as background-image and define the class to the first 'li' element and set the background-image in your CSS for the 'li' element and put appropriate spacing (padding left/right) to place the black circle.

ko ko 97 Practically a Master Poster

<div id="setTestiRow" >

'id' is unique id for CSS selector and you must identified only one element in one document.

<div id="setTestiRow" align="center" >

Remove 'align="center"'.

ko ko 97 Practically a Master Poster

Put DTD at the top of your HTML. IE ignore some CSS property while the DTD was missing.

ko ko 97 Practically a Master Poster

Vertical margin or padding cannot apply to the inline-elements. Set the 'display: block' to alter the block-level for that inline-element will work perfectly.

ko ko 97 Practically a Master Poster

Let back to your original piece of code, ie, the first one you posted. The error is at the line number '21', and it is simple MySql syntax error.

mysql_query("SELECT*FROM Products='"$result"'");

It is invalid syntax. What does '$result' mean ? Is it the variable that you want to query with ? If so, what does the '$result' refers. Field or value ? For example:

mysql_query("SELECT * FROM Products") //it fetch out all data inside the Products table
mysql_query("SELECT * FROM Products WHERE `result` = $result") //it fetch out all data from Products table where the field `result` has the value $result

But, there is one important question before fixing that line. Did you already configure or built the table with specific fields. If not, you will encounter the problem even you fixed that line.

ko ko 97 Practically a Master Poster

Try that:

<?php
include_once "connect_to_mysql.php";

$extract = mysql_query("select * from tbl_competition WHERE fld_closed='N'");
         
if(mysql_num_rows($extract) < 0){
header( 'Location: nocompetition.php' ) ;     
}
else{
header( 'Location: competition.php' ) ; 
}
?>

Hope that help.

ko ko 97 Practically a Master Poster

Attach the screen-shot of your PhpMyadmin or show the structure of your table. For example:

--------------------------------------------------
| id | serial_no | price | description | quantity |
--------------------------------------------------
| 1  | 1234567890 | 10$  | Loram ipsum | 3        |

P.S: Please wrap your code in code tags. Or select your codes and click the CODE button on the toolbar of the editor.

ko ko 97 Practically a Master Poster

Reset the margin and padding.

body {
    margin: 0;
    padding: 0;
}

This one is universal format. It will set margin and padding to '0' for all HTML elements.

* {
    margin: 0;
    padding: 0;
}
ko ko 97 Practically a Master Poster

Post HTML.

ko ko 97 Practically a Master Poster

You should not use '[]' by repeating in the loop. The '[]' will generate array room every time you assign it. You have 7 elements each time mysql_fetch looping. Specify the index for one looping. For example:

$count = 0;
while ($row = $result->fetch()) {
	$output[$count] = '<tr>';
	$output[$count] .= '<td>'.$row['manufacturer'].'</td>';
	$output[$count] .= '<td>'.$row['model'].'</td>';
	$output[$count] .= '<td>'.$row['description'].'</td>';
	$output[$count] .= '<td>&#x24;'.$row['price'].'</td>';

	$output[$count] .= '<td><input type="text" name="Value[{'.$row['id'].'}]" value="{'.$row['value'].'}"></td>';
    $output[$count] .= '<td><input type="checkbox" name="Update[{'.$row['id'].'}]" value="Box #{'.$row['id'].'}"></td>';

	$output[$count] .= '<td><a href="cart.php?action=add&id='.$row['id'].'&product='.$product.'">Add to list</a><td>';
	$output[$count] .= '</tr>';
        $count++;
}

Don't forget to put '.' to assign new value to the array element. If not, the last will override the first one and so on. You can easily check the array with 'var_dump($input)', and ensure that your data entered in the array.

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

You must setup mail server on your machine.

ko ko 97 Practically a Master Poster

Better post at PHP or CGI forums.

ko ko 97 Practically a Master Poster

Vibhadevit is right. You must use array to store for multiple checkbox values those are coming by one group. If so, you must repeat the query to retrieve the multiple values and enter to database. Vibhadevit has shown the pretty explaining with example above.
If not separate the group with specific unique name like Chrishea said. In this manner, you don't need to repeat the query.

ko ko 97 Practically a Master Poster
<ul>
   <li><input type="button" value="Home" class="menus" onclick="javascript:Show_Stuff(display1)"></li>
   <li><input type="button" value="Customers" class="menus" onclick="javascript:Show_Stuff(display2)"></li>
   <li><input type="button" value="Stringers" class="menus" onclick="javascript:Show_Stuff(display3)"></li>
   <li><input type="button" value="Stringing Machines" class="menus" onclick="javascript:Show_Stuff(display4)"></li>
   <li><input type="button" value="String Types" class="menus" onclick="javascript:Show_Stuff(display5)"></li>
   <li><input type="button" value="Racquet Types" class="menus" onclick="javascript:Show_Stuff(display6)"></li>
   <li><input type="button" value="Place an Order" class="menus" onclick="javascript:Show_Stuff(display7)"></li>
</ul>

Argument must be quoted, like this one onclick="javascript:Show_Stuff('displayx')"

ko ko 97 Practically a Master Poster

What mean the proper format ? Sorting, order or what ? Please be more precise will be appreciate for us.

ko ko 97 Practically a Master Poster

Try this one.

<!--
	function Show_Stuff(Click_Menu) 
	// Function that will swap the display/no display for
	// all content within span tags
	{
                var content = document.getElementById(Click_Menu);
		if (content.style.display == "none") 
		{
			document.getElementById(Click_Menu).style.display = "block";
		}
		else 
		{
			document.getElementById(Click_Menu).style.display = "none";
		}
	} 
	-->
ko ko 97 Practically a Master Poster

<a href="profile.php?uid=<?php echo $id; ?>" title="Go to your profile" id="list">Profile</a><BR><BR>
<a href="photos.php?uid=<?php echo $id; ?>" title="Go to your photos" id="list">Photos</a><BR>
<a href="blog.php?uid=<?php echo $id; ?>" title="Go to your Blog!" id="list">Blog!</a><BR>
<a href="friends.php?uid=<?php echo $id; ?>" title="Your Friends" id="list">Friends</a><BR>
<a href="groups.php?uid=<?php echo $id; ?>" title="See your Groups" id="list">Groups</a><BR>
<a href="pages.php?uid=<?php echo $id; ?>" title="See Your Pages" id="list">Pages</a><BR>
<a href="events.php?uid=<?php echo $id; ?>" title="Your Events" id="list">Events</a><BR />

Try with below. This is proper format for the navigation.

<ul id="left_navigation">
	<li><a href="profile.php?uid=<?php echo $id; ?>" title="Go to your profile" id="list">Profile</a><BR><BR>/li>
	<li><a href="photos.php?uid=<?php echo $id; ?>" title="Go to your photos" id="list">Photos</a></li>
	<li><a href="blog.php?uid=<?php echo $id; ?>" title="Go to your Blog!" id="list">Blog!</a></li>
	<li><a href="friends.php?uid=<?php echo $id; ?>" title="Your Friends" id="list">Friends</a></li>
	<li><a href="groups.php?uid=<?php echo $id; ?>" title="See your Groups" id="list">Groups</a></li>
	<li><a href="pages.php?uid=<?php echo $id; ?>" title="See Your Pages" id="list">Pages</a></li>
	<li><a href="events.php?uid=<?php echo $id; ?>" title="Your Events" id="list">Events</a></li>
</ul>

Add CSS to the navigation.

ul#left_navigation {
	list-style: none;
	margin: 0;
	padding: 0;
}
ul#left_navigation li {
	display: block;
	line-height: 1.5em;
	list-style: none;
}

Hope this help.

ko ko 97 Practically a Master Poster

Mark this thread as 'Solved' then. So, it will make us clear.