-
Posts
812 -
Joined
-
Last visited
Posts posted by techker
-
-
i need server side to in order to get the info from my database?
-
but you see i ahve googled just about everything i can think of.what do i look for is the question?
-
hey guys is tehre a way to put a select box on a page that when you select the lets say categorie it refreshe's the form to get the info(mysql) in that category?
i have tryed lots of was some worked but when i trye to put more then one on a page it refreshe's the first and second box..
i have tryed googling javascript event handler
onchange.
but i cant find a page that shows a for with a select box refresh...
-
-
my error is solved with the second script i posted.now the question was can i put it multiple times on one page?
-
SELECT DISTINCT pic,id FROM $cat
-
ah sorry wrong box..lol
here is the code for the new probleme.i got the dselect part working but now i need to add more of the same on a same page ..but it refresh's the hole page so all the boxes reset.i have tryed changing all to select2,querry2..check it out to see..
<? require "config2.php"; $connection = mysql_connect($dbhost, $dbusername, $dbpass); $SelectedDB = mysql_select_db($dbname); $cat=$_GET['cat']; ?> <!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=utf-8" /> <title>Untitled Document</title> <SCRIPT language=JavaScript> function reload(form) { var val=form.cat.options[form.cat.options.selectedIndex].value; self.location='sel2.php?cat=' + val ; } </script> </head> <body> <form id="cat" name="cat" method="post" action=""> <label> <select onchange="reload(this.form)" name="cat" id="cat"> <option value="selected"><? print"$cat" ?></option> <option value="ABS">ABS</option> <option value="ARMS">ARMS</option> <option value="LEGS">LEGS</option> <option value="SHOULDERS">SHOULDERS</option> <option value="CHEST">CHEST</option> </select> </label> </form> <p> <? if(isset($cat) and strlen($cat) > 0){ $quer=mysql_query("SELECT DISTINCT pic,id FROM $cat" ); }else{$quer=mysql_query("SELECT DISTINCT pic,id FROM $cat "); } echo "<select name='subcat'onChange='swapImage()' ><option value=''>Select one</option>"; while($noticia = mysql_fetch_array($quer)) { if($noticia['pic']==@$cat3){echo "<option selected value='$noticia[pic]'>$noticia[pic]</option>"."<BR>";} else{echo "<option value=/Account/PICS/$cat/$noticia[pic]>$noticia[pic]</option>";} } echo "</select>";?> </p> <p> </p> <table width="442" height="138" border="0" cellpadding="0" cellspacing="0"> <tr> <th scope="row"><form id="cat2" name="cat2" method="post" action=""> <label> <select onchange="reload(this.form)" name="cat2" id="cat2"> <option value="selected"><? print"$cat2" ?></option> <option value="ABS">ABS</option> <option value="ARMS">ARMS</option> <option value="LEGS">LEGS</option> <option value="SHOULDERS">SHOULDERS</option> <option value="CHEST">CHEST</option> </select> </label> </form> <p> <? if(isset($cat2) and strlen($cat2) > 0){ $quer2=mysql_query("SELECT DISTINCT pic,id FROM $cat2" ); }else{$quer2=mysql_query("SELECT DISTINCT pic,id FROM $cat2 "); } echo "<select name='subcat1'onChange='swapImage()' ><option value=''>Select one</option>"; while($noticia2 = mysql_fetch_array($quer2)) { if($noticia2['pic']==@$cat3){echo "<option selected value='$noticia2[pic]'>$noticia2[pic]</option>"."<BR>";} else{echo "<option value=/Account/PICS/$cat2/$noticia2[pic]>$noticia2[pic]</option>";} } echo "</select>";?></th> </tr> </table> <p> </p> </body> </html>
-
-
nice thx.
is there a way i can copy and past this form mulitiple times on one page?cause when i do so it refresh's all the select boxes..
-
What do you mean?
-
hey guys i got some part of my list boxes good but it does not stay on the selected choise?
it refreshe's the page but it does not stay on the selected choice>?
<? require "config2.php"; $connection = mysql_connect($dbhost, $dbusername, $dbpass); $SelectedDB = mysql_select_db($dbname); $cat=$_GET['cat']; ?> <!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=utf-8" /> <title>Untitled Document</title> <SCRIPT language=JavaScript> function reload(form) { var val=form.cat.options[form.cat.options.selectedIndex].value; self.location='sel.php?cat=' + val ; } </script> </head> <body> <form id="cat" name="cat" method="post" action=""> <label> <select onchange="reload(this.form)" name="cat" id="cat"> <option value="ABS">ABS</option> <option value="ARMS">ARMS</option> <option value="LEGS">LEGS</option> <option value="SHOULDERS">SHOULDERS</option> <option value="CHEST">CHEST</option> </select> </label> </form> </body> </html>
-
hey guys i was wondering on how i can get info from my database from a select box.
like i tryed this with no luck:
<? require "config2.php"; $connection = mysql_connect($dbhost, $dbusername, $dbpass); $SelectedDB = mysql_select_db($dbname); $cat=$_GET['cat']; $QQQ1 = mysql_query(" SELECT id, pic FROM $cat "); if(!$QQQ1) die(mysql_error()); $err = mysql_num_rows($QQQ1); if($err == 0) die("No matches met your criteria."); ?> <!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=utf-8" /> <title>Untitled Document</title> </head> <body> <form id="form1" name="form1" method="post" action=""> <label> <select onchange="reload(this.form)" name="cat" id="cat"> <option value="ABS">ABS</option> <option value="ARMS">ARMS</option> </select> </label> </form> <? while ($line = mysql_fetch_array($QQQ1)) { echo "<option value=\"$line[id]\">$line[pic] </option>"; }?> </body> </html>
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
im shure it's because it is executing the query before i chose the categorie?
-
this is what i tryed up to now.
<? $query = "SELECT * FROM clients_graph"; $result = mysql_query($query)or die(mysql_error()); print "<SELECT name=\"client\">"; while ($line = mysql_fetch_array($result)) { echo "<option value=\"$line[id]\">$line[2]</option>"; } //print "</select>"; echo "<img src='/Account/PICS/". $line['2'] ."' border='0' hight=120/>"; print "</select>"; ?>
-
hey guys i have a databse withe images in it(just the path to the image folder)
i want to make a list menu but instead of the pic name i want the image to show instead?is that possible???
or when you select the name the image apears?that would be better.thx
-
hmm javascript .i will check it out
-
hey guys i have a script that generates a page with pics on demand.
now it has a grid (that i did ) as background and over it shows litle pics in the squares.
now it works great but when i try to print it only shows the small pics not the background??
-
he wants the site..it free publicity for him.anyways i will figure it out thx.
-
i don't know if you know but in that art business there is alot of copy's!ever look for a tattoo before?your fisrt step is google ...
it has nothing to do with
corporate-riaa-microsoft-fud" bullshit mentality
when you pay to have it piss you off when you see other people with it.
-
its because im doing a web site for my boddy that is a tattoois.so he does not want anybody copying his pics.unique styles..
-
i will try that thx guys!!
-
hmm..thx
-
inless i load the image in a page an put some javascript for no right click?
-
hey guys i have a gallery that has thumbnails and when you click it takes you to the images.
i need to prevent downloading of that pic?
this is the echo.
Code: echo '<th scope="row"><a href="/admin/art/'. $row['pic'] .'" target="_blank" > <img src="/admin/imgsize.php?w=60&h=50&img=art/'. $row['pic'] .'" border="0" alt="" /> </a>
so it does not load in a page it gets the images in its directory..
--------------------------------------------------------------------------------
-
din't do mutch fo me cause it is not the full script.i wanted to get my script one going?
reload form?
in PHP Coding Help
Posted
so i fanaly found one that maybe has potential!lol
xml and ajax.
it works good but if i add another on the page and changed the get page to fincity2 and the divtag to city2
the both work but when i select the second one it changes the first one.
i will barke down the code:
the xml
and the reference page for the query is