ShawnCplus 456 Code Monkey Team Colleague

You're never passing an argument to the findValue function. findValue requires an argument but it is never receiving one.

ShawnCplus 456 Code Monkey Team Colleague

Well if you're basing the creation on AJAX calls then you'd probably want to use a bit of DHTML instead of manipulating the innerHTML property, ie.,

function addRadio(parentID, radioID,radioName,innertext,color)
{
    parent = document.getElementById(parentID);
    newRadio = document.createElement('input');
    newRadio.type = 'radio';
    newRadio.id = radioID;
    newRadio.name = radioName;
    parent.appendChild(newRadio);
    newtext = document.createElement('span');
    newtext.style.color = color;
    newRadio.appendChild(newtext);
    newtext.text = innertext;
}
peter_budo commented: Nice work +7
ShawnCplus 456 Code Monkey Team Colleague

Give this a shot

<input type='text' name='PickupAddressPostCode' value='<?=$row['PickupAddressCode'];' />
ShawnCplus 456 Code Monkey Team Colleague

Well, that's a detail you did not expound upon. Also showing us an entire page instead of 5 lines of code would help. It's a bit hard to debug an image.

ShawnCplus 456 Code Monkey Team Colleague

Why would you create multiple instances of the same image with DOM manipulation instead of just setting the background image on the div with css which will automatically tile the image?

ShawnCplus 456 Code Monkey Team Colleague

Anyway, aside from that

Notice: Undefined variable: sql in /home/book2.php on line 16

Notice: Undefined variable: a_row in /home/book2.php on line 33

Notice: Undefined variable: a_row in /home/book.php on line 34

The first error is happening because echo $sql; should be echo $query .
The second and third are happening because $a_row should be $row

ShawnCplus 456 Code Monkey Team Colleague

As per the rules, Suomedia, it's good to keep things on the site. Solving problems through PMs, email and sending attachments makes things cumbersome and difficult to search through if someone else is sharing the problem.

ShawnCplus 456 Code Monkey Team Colleague

Well there's no "suggestion", if you get that error then you are sending data before you are using that function. You can use functions above header() but you cannot output anything before the heaader.
OK

$a = 2 + 2;
header('Location: example.com');

BAD

$a = 2 + 2;
echo $a;
header('Location: example.com');

Also note that this question has been answered umpteen times before, please do a search before starting a new thread.

ShawnCplus 456 Code Monkey Team Colleague

The simplest solution I've found, and many others since it seemed to spread across the web like wildfire, is the JW Media Player. It is a flash based media player with an external javascript API. Incredibly easy to use, there are a ton of tutorials and a pretty thorough tutorial within the package itself. That should get you off and running pretty quickly.

ShawnCplus 456 Code Monkey Team Colleague

Sorry if you got confused, this is the PHP forum, you can take a look at the JSP Forum for JSP help.

ShawnCplus 456 Code Monkey Team Colleague

While there is no browser integration that determines whether a specified window is open or not you could set a session bit once someone has visited the page then display the 'error' message if they visit it again with the bit set.

ShawnCplus 456 Code Monkey Team Colleague

It works for all letters, you just can't use a variable inside single quotes.

$myVar = 'Hello World';
$string = '/$myVar/'; //== /$myVar/
$string = "/$myVar/" //== /Hello World/
ShawnCplus 456 Code Monkey Team Colleague

yes.. try:

$search = $_GET['word'];

It's a regular expression so the correction would be

$search = "/$_GET[word]/i";
ShawnCplus 456 Code Monkey Team Colleague

onmouseover='this.height += 100;this.width += 100'
That's the most basic version.

ShawnCplus 456 Code Monkey Team Colleague

You are using single quotes (') for your $search string. Variables aren't parsed inside single quotes. So the search string right now is literally '/$_GET[word]/i'

ShawnCplus 456 Code Monkey Team Colleague

Without rival the most useful javascript debugger/general web development tool is FireBug in combination with Web Developer Toolbar.

Firebug has a very powerful debugger complete with conditional breakpoints and source tracing.

Web Developer Toolbar has a veritable cornucopia of handy tools for web developers.

ShawnCplus 456 Code Monkey Team Colleague

To quote Salem, it's a semantic, not syntactic, superset

ShawnCplus 456 Code Monkey Team Colleague

C++ is a superset of C so any C program can be compiled and run as a C++ program(doesn't change the fact that it is really C)

ShawnCplus 456 Code Monkey Team Colleague

If it's on the web and you're already using PHP you might want to look into using a MySQL database instead of a flatfile, they are much easier to work with.

ShawnCplus 456 Code Monkey Team Colleague

The only thing that doesn't look right is the Upper call.

ShawnCplus 456 Code Monkey Team Colleague

Any reason why you want to open 30 windows, any tabbed browser can eliminate the memory usage. I'd have to do the obligatory Firefox whoring as the main one.

ShawnCplus 456 Code Monkey Team Colleague

You cannot have more than one element use the same ID, that is what is causing the error. IDs are meant to be unique identifiers, classes are meant to be reusable.
ie.,

#head h2.highlight{color:#FF0000;}
#body h2.highlight{color:#0000FF;}
h2.highlight{color:#00FF00;}
<div id="head">
   <!-- this will be red -->
   <h2 class="highlight">Hello World</h2>
</div>
<div id="body">
   <!-- this will be blue -->
   <h2 class="highlight">Hello World</h2>
</div>
<!-- This will be green -->
<h2 class="highlight">Hello World</h2>
ShawnCplus 456 Code Monkey Team Colleague

There is the built in PHP mail function but there is also a mailer in the PEAR package for PHP.

ShawnCplus 456 Code Monkey Team Colleague

The easiest way to delete all rows from a table is this

var Parent = document.getElementById(tableID);
while(Parent.hasChildNodes())
{
   Parent.removeChild(Parent.firstChild);
}

Note that when using removeChild that if it removes the last element it will also delete the parent node. I guess it assumes that if you have no child nodes then you don't need the parent node.

Also, don't make a habit of making function calls inside the loop, it is costly.

var Parent = document.getElementById(tableID);
while(Parent.hasChildNodes())

Is MUCH more preferable to

while(document.getElementById(tableID).hasChildNodes())
ShawnCplus 456 Code Monkey Team Colleague

Firstly, you don't need to put a strong tag inside h1 since it already bolds anything in h1.
Secondly, an image link is created with <img src="image link here" alt="text to display if it doesn't show up" />

ShawnCplus 456 Code Monkey Team Colleague

It's called the arrow operator, and when using it you don't prepend the member with $, ie.,

class SomeClass{
private $blah = "Hello";

function getBlah(){return $this->blah;}
function setBlah($value){$this->blah = $value;}
}

In another file

$something = new SomeClass();
$myBlah = $something->getBlah();
echo $myBlah; //"Hello"
$something->setBlah("World");
$myBlah = $something->getBlah();
echo $myBlah; //"World"
sagedavis commented: Thanks Shawn, your snip on PHP -> was very helpful. +1
ShawnCplus 456 Code Monkey Team Colleague

Sorry, I actually laughed at that. Leaving off the end tag makes the HTML invalid, and can cause cascading errors.

ShawnCplus 456 Code Monkey Team Colleague

Well for both files you aren't ending your option tag when you generate them, it may not be what's causing the problem but it's incorrect nonetheless

ShawnCplus 456 Code Monkey Team Colleague

Yeah, take out the label attribute. It's not serving any purpose in firefox or IE

ShawnCplus 456 Code Monkey Team Colleague

i am new to dis programming world n programming languages ...so plz help me n tell how i b a gud programmer...my coding is week wat shall i do 2 improve it plz help me:(

As the previous posters said, there are many good starter guides. However, if you stick around this community please read the Community Rules, Welcome Guide and FAQ. We appreciate whole words, txt talk serves only to complicate already complicated problems. Welcome to Daniweb either way.

ShawnCplus 456 Code Monkey Team Colleague

In Internet Explorer 7, the 'label' property is equivalent to the innerText property in Firefox. So Firefox ignores the label property and uses innerText (Group) whereas IE sees the label property(supGrpSrch0) and overrides the innerText.

ShawnCplus 456 Code Monkey Team Colleague

Change folder permission so only the server daemon has read privileges, may or may not work :)

ShawnCplus 456 Code Monkey Team Colleague

Pass it using POST and not GET

ShawnCplus 456 Code Monkey Team Colleague

It's an integer so you must not surround it with quotes so you would do $query = "SELECT * FROM `music` WHERE `catid` = $catid";

ShawnCplus 456 Code Monkey Team Colleague

Richie, those lines of code are from a class. They are most likely being initialized in the constructor.

ShawnCplus 456 Code Monkey Team Colleague

Take all of the @ out from in front of the function calls, that is suppressing the errors. You'll be able to see the errors after you remove them.

ShawnCplus 456 Code Monkey Team Colleague

Take a look at script.aculo.us.

ShawnCplus 456 Code Monkey Team Colleague

Please post relevant code only. IE., any code that has changed since the last time it worked. Posting ~1k lines of code then saying "What's wrong" doesn't help. Also, if you are using a class that has been worked on as much as this then the problem most likely lies in your query.

ShawnCplus 456 Code Monkey Team Colleague
<?php
     session_start();
      if($_SESSION["status"]="logged") {
      session_unset(); 
      session_destroy();
       header( "Location:../index.php" ); 
      exit();
     } else { 
       if ($_SESSION["status"]="not logged") {
//the session variable isn't registered, the user shouldn't even be on this page 
       header( "Location:../index.php" ); 
      exit();
    }
  }
?>

Take a look at those if statements. Those are SETTING $_SESSION, not comparing them. Comparisons use ==

ShawnCplus 456 Code Monkey Team Colleague

Firstly

$query = "select * from `music` WHERE `music`.`catid` = '" . $catid . "'";

can be simplified to

$query = "SELECT * FROM `music` WHERE `catid` = '$catid'";

To order you would have

$query = "SELECT * FROM `music` WHERE `catid` = '$catid' ORDER BY `artist`";

Typically pagination is done in two ways:
1. Inside the query using LIMIT statements ie.,

SELECT * FROM `music` WHERE `catid`= '$catid' LIMIT $limitStart,20

2. Outside the query using loop limiters ie.,

for($i=$limitStart;$i<$limitEnd;$i++)

Also, is catid an integer or a varchar/text/memo field? If it is an integer surrounding it with quotes will break the query.

ShawnCplus 456 Code Monkey Team Colleague

Well you can't exactly control that because even if it opens in a new window for one user another might have their settings to override opening pages in a new window IE., no matter what you do it will open in a new tab. Controlling the user is a bit difficult and unpredictable.

IE will pretty much always open a new window when it encounters the window.open() method. However, Firefox's action is, as I said before, a bit unpredictable.

Why do you want to hide the address bar?

ShawnCplus 456 Code Monkey Team Colleague

Well HTML isn't a programming language so, no you can't use HTML to do that. PHP has a pretty powerful library (the GD library) to work with images however.

ShawnCplus 456 Code Monkey Team Colleague

There is in_array But I'm not entirely sure if that's what you're looking for.

ShawnCplus 456 Code Monkey Team Colleague

When checkboxes are sent in requests as "on" if they are checked, if they are not checked they aren't sent at all. You're also missing an if on line 20

ShawnCplus 456 Code Monkey Team Colleague

Well firstly

$result = mysql_query("SELECT * FROM bak_bill_cust");
 while( $row = mysql_fetch_array( $result ) ):
 $option = $row["cust_code"];

echo "<option value='$row[cust_code]'>$row[cust_code]</option>";
endwhile;

>>>

$result = mysql_query("SELECT * FROM bak_bill_cust");
while( $row = mysql_fetch_assoc( $result ) )
{
    $option = $row["cust_code"];
    echo "<option value='$option'>$option</option>";
}

I actually wasn't even aware PHP could use that format for while loops but I wouldn't advise its use given that it completely breaks the Perl-like syntax and just makes for ugly code.

ShawnCplus 456 Code Monkey Team Colleague

What do you want it to do? You didn't really explain that.
To have an image in a page you do <img src='image location' alt='If it doesn't show up' /> for a favicon it's <link rel='shortcut icon' href='image location' type='image/(mimetype)' />

ShawnCplus 456 Code Monkey Team Colleague

I would have to seriously recommend you do not use JavaScript to validate the passwords. Use a server-side language so the script cannot be viewed by the public.

If you publish your password rules then you pretty much give bruce-forcers a head start. It's a bit like saying, "I wont tell you the combination but the first number is between 10 and 20, the second is between 5 and 30 and the last is between 0 and 10"

ShawnCplus 456 Code Monkey Team Colleague

yes, that section but it must be moved below the ending php tag "?>"

ShawnCplus 456 Code Monkey Team Colleague

You can't send any data before you try to send headers. All that text above the php tags must be moved below.

ShawnCplus 456 Code Monkey Team Colleague

GMail's obfuscation isn't intentional, it's a side effect of minifying your javascript to improve speed. Things like JSmin can sometimes cut the size of JS files by half, now imagine if you're Google and you have about 15 million people viewing a page per day, reducing the size of a file by half will significantly reduce badwidth.