Jump to content

snake310

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

snake310's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the help JavaScript helped
  2. SO i`ll try to make this as clear as i can. I would like ti have a simple textbox like : <input name="serial" type="text" id="serial" /> My question is is it possible when i go to the page this texbox is already selected an i would not have click on it to write in it
  3. example: $phrase="This is what i want"; I want to get out the words from the phrase one by one like: $word1="This"; $word2="is"; and so on.. any idea any1?
  4. btw Problem solved thx for the help guys
  5. what i am listing there is a select list menu and now it goes like model1 (blank) (blank) model2 (blank) model3 and blank meant that it`s nothing there but it is selectible
  6. thx that is what i needed but there is still one thing it leaves blank fields... any ide what to do?
  7. i have a code: $inter="SELECT model FROM $get2"; $id_rez=mysql_query($inter); $row=mysql_num_rows($id_rez); while($rand=mysql_fetch_row($id_rez)) for($i=0;$i<$row;$i++) echo "<option>".$rand[$i]."</option>"; So this works fine , but i dont know how to evade to list every item just once , like if i have 3 of the same model i would like to show only 1 pls help i tried a lot of stuff it didnd`t work
  8. What is the problem in this source , is it even possible to do something like this : $recordset="INSERT INTO `$table`";         $recordset .=" WHERE "; $recordset .=" `$table`.serial = '$serial'"; $recordset .=" (OutTime, buyer) "; $recordset .=" VALUES('$OutTime','$Buyer') "; mysql_query($recordset);
  9. Hi i have read tonns of tutorials but i cant figure out what could be the problem pls help me... He wont write it to the database the wariables named $get1 and $producer works fine , at least as i echo them they show the right walue <?php mysql_pconnect("localhost","root")                   or die("Unable to connect to SQL server"); mysql_select_db("$get1") or die ("No Conn"); if(!$producer) $x=1; else { $sql = 'CREATE TABLE $producer ('.         '`model` varchar(60) NOT NULL default 0,'.         '`serial` varchar(60) NOT NULL default 0,'. '`InTime` date NOT NULL default 0,'. '`provider` varchar(60) NOT NULL default 0,'. '`aviz` varchar(60) NOT NULL default 0,'. '`OutTime` date NOT NULL default 0,'. '`add1` varchar(60) NOT NULL default 0,'. '`add2` varchar(60) NOT NULL default 0,'. '`add3` varchar(60) NOT NULL default 0,'.         '`buyer` varchar(60) NOT NULL default 0,.       )';   $result = mysql_query($sql) or die ("Fail");} ?>
  10. Hello   I have this at the satat of the page $get1=$_GET['list']; $get2=$_GET['list2']; $get3=$_GET['list3']; $serial=$_GET['serial']; $InTime=$_GET['InTime']; $provider=$_GET['provider']; $validnumb=$_GET['validnumb']; I think i don`t have to tell what it dose , what can i do to make list , list2, ... validnumb not an unidentified index?? and the error message :Notice: Undefined index: list in c:\program files\easyphp1-8\www\new prod.php on line 3 BTW i use these variables later in the page so when i reload the errormessages disapear and everything works fine. Any1 has any idea?? ???
  11. Hello this listing works fine , the only thing is that i dont want to list the same named thing twice, any1 has any idea   if(!$get2)        echo "<option>step 3</option>"; $a=z; $id_tab=mysql_list_fields($get1,$get2,$id); $nr_col=mysql_num_fields($id_tab); @mysql_select_db($get1); $inter="SELECT model FROM $get2"; $id_rez=mysql_query($inter); $row=mysql_num_rows($id_rez); while($rand=mysql_fetch_row($id_rez))   for($i=0;$i<$row;$i++){       for($n=$i;$n=0;$n--)       if($rand[$i]=$rand[$n-1])         $a=$i;         if($i!==$a)         if($rand[$i]!=NULL)       echo "<option>".$rand[$i]."</option>";  }             if($_GET['list3']=NULL)         echo "<option selected>Please Select</option>";          else                        echo "<option selected>".$get3."</option>"; ?> I sorry for makeing a new pst the same name but i accidentyly locked the other one
  12. Hello this listing works fine , the only thing is that i dont want to list the same named thing twice, any1 has any idea if(!$get2) echo "<option>step 3</option>"; $a=z; $id_tab=mysql_list_fields($get1,$get2,$id); $nr_col=mysql_num_fields($id_tab); @mysql_select_db($get1); $inter="SELECT model FROM $get2"; $id_rez=mysql_query($inter); $row=mysql_num_rows($id_rez); while($rand=mysql_fetch_row($id_rez)) for($i=0;$i<$row;$i++){ for($n=$i;$n=0;$n--) if($rand[$i]=$rand[$n-1]) $a=$i; if($i!==$a) if($rand[$i]!=NULL) echo "<option>".$rand[$i]."</option>"; } if($_GET['list3']=NULL) echo "<option selected>Please Select</option>"; else echo "<option selected>".$get3."</option>"; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.