Jump to content

pacome

Members
  • Posts

    42
  • Joined

  • Last visited

    Never

Everything posted by pacome

  1. I select from DB and en up with an array... the question is: is it possible to register the variables as session varibles with different names? $sqlVuelos = "SELECT * FROM vuelos ORDER BY RAND() LIMIT 4"; $displayVuelos = mysql_query ($sqlVuelos) or die ('query wrong'); mysql_query ($sqlVuelos) or die (mysql_error ($conVuelos)); while ($rowVuelos = mysql_fetch_array($displayVuelos)) { $vuelo = $rowVuelos["vuelo"]; $tipo = $rowVuelos["tipo"];} thank you...
  2. ok! I will try with the meta... and see if I manage to do it! after all is only a game and I can allow myself to be flexible... thanks!
  3. right... so I will check Javascript thanks again!
  4. hi... I'm trying to program a small game for myself... I've got some data in a DB which I extract within a WHILE loop, but I would like the data extracted to print slowly, not all at once! let's evey 30 seconds interval... while ($cont < { extract data; print one of the 8 every 30 seconds; } ¿which function or line does this type of thing? thank you.
  5. I'm trying to insert into DB but it doesn't any ideas why? <?php function insertar () { $con = mysql_connect ('','','') or die ("no conn"); @mysql_select_db ('aerosim') or die ("hey somth wrong"); $sql = "INSERT INTO vuelos (`vuelo`,`tipo`) VALUES ('$IBE','$tipo')"; mysql_query ($sql) or die (mysql_error ($con)); } if ($vuelo = ""){ $vuelo=rand(1000,4000);} else{ $vuelo = ($vuelo + rand(1000,5000));} echo "IBE".$vuelo; $IBE="IBE".$vuelo; $tipo = "A330"; insertar($IBE, $tipo); ?> an id and timestamp variables are written to the DB each time I refresh the page, but the variables from the script don't get written... so connection is ok, but variables are not getting there... thanks!
  6. wow! I ' ll try this too! thanks!
  7. thanks to him/her and to you for passing it to me!!!
  8. Sorry I guess sitting here in my PC made me loose my sense of time.. thanks for your help!
  9. I've got a table in a word doc with some country and city codes... is there any way of inserting them all into a mysql db without going one by one? thanks!
  10. pacome

    index size

    right! thank you... so I guess not many people owe the old 15" monitors... and I understand you use CSS for your layouts?
  11. pacome

    index size

    Hi! I'd like to make normal webs and not be restricted to 775px width... I know I could use the good old 100% width table, but the question is... what happens with the pictures ?? do I have to center them and not make them bigger than 775px in case somebody with a small monitor visits the web? thanks for your help.
  12. and for the rest I use the value='<?php echo $yourvar; ?>' and does the trick too..
  13. I've got this working just fine... it's standard html and I echo the comment if some variable is missing, only the passwords, or the incorrect data misses being printed again <td valign="bottom" width="250px"  bgcolor="#FFFFFF" ><textarea class="textarea" name="comentario"><?php echo $coment; ?></textarea></td>
  14. great it's working just fine! one more question! do I have to call the variable $_SESSION[nicksess] everytime or can I rename it let's say $nick and it will be availble with session_start() in other pages? thank you again
  15. I'm trying to pass some variables through a session with PHP 4.329 but I can't manage to get them through the pages... My host's has this info Session Support  enabled  Registered save handlers  files user  Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 Off Off session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 1000 1000 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path /var/lib/php/session /var/lib/php/session session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid Off Off and my script is page 1: <?php session_start(); session_name('ses'); if ($_POST[nicksess]) { $nicksess=$_POST['nicksess']; //$nicksess=$_POST[nicksess]; //session_register("nicksess"); echo "<html><body><a href='page2.php'>go to page 2</a><br>".$_POST['nicksess']." <br>y ".$nicksess."</body></html>"; } else { ?> <html><head></head> <body> <form action='page1.php' method='POST'> <input type='text' name='nicksess'>Name<br> <input type='password' name='pass'><br> <input type='submit' name='submit' value='submit'></form> </body></html> <?php } ?> and page 2 is: <?php session_start(); session_name('ses'); echo "<html><body>Mi nick es:".$_SESSION["nicksess"]." </body></html>"; ?> When I put my name I print correctly $_SESSION["nicksess"] and $nicksess, but when I click to page 2 the nick doesn't print! :( any ideas? thanks!
×
×
  • 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.