of javac and loving what u do

Status
Not open for further replies.

tgkprog

Member
Messages
226
Reaction score
0
Points
16
hey all I'm Tushar from Bangalore

worked for some big shots - GE , CTS for 7 years ... now on my own
I hated working on VNC like software to log in to work in slow motion on a remote server.

The other was having quality people breathing down my neck about variable names in code and other doc quirks that only them and the clients quality people bothered about ... and commuting!

now I'm making on average 60% of the money I did before but am 100% happier!

am a java enthusiast though learnt php. perl, a veee bit of c , dot net along the way.


like to read ( pulp or readers digest or the funnies in the paper; when i have time), walk ( back achessss http://tk.celladmin.com/ ), swim dance sometimes ... used to go on 2 day treks but not n a year ... plan 1 in december

like comedies. wish people would get along more or at least not bomb and kill when they dont - my family gets along jsut well not talking to each other
 

tgkprog

Member
Messages
226
Reaction score
0
Points
16
It rules say we need to login every 2 weeks - does that mean - just log in - log out to the forum or make a post too??

Thanks
Tushar
 

Starshine

Legend Killer
Messages
14,423
Reaction score
0
Points
0
It rules say we need to login every 2 weeks - does that mean - just log in - log out to the forum or make a post too??

Thanks
Tushar

Just login. Though we wouldn't mind if you stopped in and posted, or replied to other posts. But posting is NOT a requirement. Just logging in. :)
 

tgkprog

Member
Messages
226
Reaction score
0
Points
16
ty geek speak

any wap folks here?
hi

is there a wmlscript function to be set to run when a page loads (based on a flag - saw a get request variable == 2)

and on that fucntion to set focus to a particular input text box?

Domain: I have a form with 4 text boxes

need to go to the 3rd box when user returns from a particular link

needs to work on phones 2006 and later like the nokia 5300 with latest software

fyi i fill up values with the previous values with cookeis which do work ...

in PHP
Code:
<?php 


    header("Content-type: text/vnd.wap.wml");              // set the content type for WML
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");                       // disable ALL caching
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
   	echo("<?xml version=\"1.0\"?>\n");
    echo("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"(URL address blocked: See forum rules)\">\n\n");    
?>

<wml>


  <head>
  <meta forua="true" http-equiv="Cache-Control" content="must-revalidate"/>
  </head>
  
  
<card title="SMA1">
<!-- Cabecera con el logo  --> 
   Version 004 		    <br/>

 <p> <small>   Introduzca datos  en el siguiente formulario: </small>
</p> 
<!-- Datos  CRD  -->
<fieldset>
<?php
if(isset($HTTP_COOKIE_VARS["zxp"])) {           // Check if TestCookie is set
      $zxp = $HTTP_COOKIE_VARS["zxp"];         // Read the Cookies
      $vxp = $HTTP_COOKIE_VARS["vxp"];
      $dxp = $HTTP_COOKIE_VARS["dxp"];
      $pxp = $HTTP_COOKIE_VARS["pxp"];
      
    }
    else {      
      $zxp ="";
      $vxp ="";
      $dxp ="";
      $pxp ="";
    }
    
    ?>
<p align="left"> 
<b> Zxxx: </b><input type = "text" format = "*N" name  =  "zxp" maxlength = "2" size = "2" value = "<?php echo $zxp; ?>"/> <br/>
<b> Vxxxx: </b> <input type = "text"  format = "N" name = "vxp" maxlength = "1"  size = "1"  value = "<?php echo $vxp; ?>"/> <br/>
<b> Dxxxxx: </b><a name="dx_anchor"><input type = "text"  format = "*N" name = "dxp" maxlength = "3" size = "3"  value = "<?php echo $dxp; ?>"/></a> <br/>
<b> Pxxxxx: </b><input type = "text"  format = "N" name = "pxp" maxlength = "1" size = "1"  value = "<?php echo $pxp; ?>"/> <br/>

</p>
  </fieldset>


<anchor>
<go href="process_data2.php" method="post">
<postfield name = "zx"  value= "$zxp"  />
<postfield name = "vx" value= "$vxp"  /> 
<postfield name = "dx" value= "$dxp" /> 
<postfield name = "px" value= "$pxp"  />

</go>
Enviar
      </anchor>

<br/>
<!-- zxp 3 is [<?php echo $zxp ; 
?>] -->

<script>
</script>
</card>
</wml>
-----------------------

Snippet from page which is hit sets the cookies

Code:
//If input is OK
	if(is_numeric($z) && is_numeric($v) && is_numeric($d) && is_numeric($p) 
		&& $z>0 && $v>0 && $d>0 && $p>=0 && strlen($z)<=2 && strlen($v)<=1 && strlen($d)<=3 && strlen($p)<=1
		&& $z!="" && $d!="" && $v!="" && $p!=""){
		
		$HTTP_COOKIE_VARS["zxp"] = $z;
		setcookie ("zxp", $z ."", time()+60*60*24*90 );
		setcookie ("vxp", $v ."", time()+60*60*24*90 );
		setcookie ("dxp", $d ."", time()+60*60*24*90 );
		setcookie ("pxp", $p ."", time()+60*60*24*90 );
		echo "<!-- set cookie zxp to [" . $HTTP_COOKIE_VARS["zxp"] . "] -->";
		$sql = "INSERT INTO Matrix_Values (Z, V, D, P) VALUES ($z, $v, $d, $p) 
				ON DUPLICATE KEY UPDATE P = $p;";
		
		mysql_query($sql, $connection);
		echo "<div align=\"center\">OK, data entered successfully";
	}
	else
	{
		echo "<div align=\"center\">KO, invalid data";
		echo "You entered: z [$z] v [$v] d [$d] p [$p] ";
	}
 
Status
Not open for further replies.
Top