I can't seem to find a working example of a dynamiclly generated php/ javascript listbox so I guess it would be useful to a lot of people, and will post the finished script so that others can use it. ( If u know otherwise please feel free to correct me)
I will check my php code if u think that...
ok this is the code i'm using:
<?
include ('/files/home3/munchexpress/Includes/db_connect.php');
$sql="SELECT CategoryID, Name FROM categories WHERE CategoryParentID = 0 AND Name <>'Top'";
$result=mysql_query($sql) or die ("dead");
$mainselect = array();
while($row=mysql_fetch_assoc($result))...
ok I'm trying this but I get a parse error: unexpected $ on the last line:
<?
include ('db_connect.php');
$sql="SELECT CategoryID, Name FROM categories WHERE CategoryParentID = 0 AND Name <>'Top'";
$result=mysql_query($sql) or die ("dead");
$mainselect = array()...
ok have tried that too, gives me:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /files/home3/munchexpress/hhh.php on line 81
echo $option['value'];
I can't see anything wrong with it, still confused :)
Cheers Chessbot you...
this gives me:
this.form.links is null or not an object
<?
include_once("/files/home3/munchexpress/Includes/db_connect.php");
$arraycount=0;
$counter++;
$counter2=($counter+1);
$counter3=($counter+2);
$sql= "select StockID, Photo, StockName from stock";
$result = mysql_query($sql) or die...
ok so i am trying this:
<?
include_once("/files/home3/munchexpress/Includes/db_connect.php");
$arraycount=0;
$counter++;
$counter2=($counter+1);
$counter3=($counter+2);
$sql= "select StockID, Photo, StockName from stock";
$result = mysql_query($sql) or die ("dead")...
ahah! its actually changing the other links in the page rather than the links i want to change
document.links[0].href
so how how can I make the above code work with just the links I want to change?
I have tried:
document.js_ad.links[0].href
but that doesn't work...
ok i've whittled it down to this line:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /files/home3/munchexpress/hhh.php on line 79
echo '<option value="' . $option['value'] . '">' . $option['text'] . '</option>';
Hi peeps,
I made a little script that calls photo's from my MySQL db, then passes them from a PHP array to JS.
The problem I'm having is although it works if run directly, when i add it to my mainpage, it doesn't work...
Anyone got any ideas?
Here's my code..
<?
include_once
$arraycount=0...
www.nochex.com is a uk based Small Electronic Money Issuer and accepts credit card payments, and has APC (automatic payment confirmation so that u can check/decline payments, etc)
I am still attempting to set up Paypals API refunds etc, its a pain!
Hi guys I'm trying to use PEAR HTTP:Request, which requires Socket.php, URL.php and some other bits and pieces.
The problem I'm having is when I run my code I get the following error:
Warning: fread(): SSL: fatal protocol error in /files/home3/munchexpress/Includes/Net/Socket.php on line 262...
Nope! this still gives the same error:
<?
include ('/files/home3/munchexpress/Includes/db_connect.php');
$sql="SELECT CategoryID, Name FROM categories WHERE CategoryParentID = 0 AND Name <>'Top'";
$result=mysql_query($sql) or die ("dead");
$mainselect = array()...
Hi ok i changed that but now I'm getting:
Parse error: parse error, unexpected T_SL, expecting ',' or ';' in /files/home3/munchexpress/Includes/chainedlistboxes.php on line 54
line 54 is:
echo <<<END
line 55 is
function populate(mainsel)
What does that strange <<<END command do?
hi eric,
can u explain this in a little more depth pls?
If you're using an autonumber field you should use LAST_INSERT_ID() after you insert the record, which is specific to your connection and guaranteed to work.
I'm not using an autonumber for OrdNum...
hmmmmm maybe I could use the...
Yep heres what I ended up using:
<?
include ('db_connect.php');
$sql="SELECT DISTINCT OrdNum FROM orders ORDER BY OrdNum DESC LIMIT 1";
echo $sql;
$result = mysql_query($sql);
if ( $result === FALSE )
{
print "An Error occured while attempting to save your form"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.