PDA

View Full Version : simple question for a novice



nerzhul
September 23rd, 2003, 06:41 AM
hi,

look at this php code and plz tell me how can i print the result on a flash animation.



<?
$server="localhost";
$user="user";
$pass="pass";
$database="database";

$connessione = @mysql_connect($server,$user,$pass);
$database = mysql_select_db($database,$connessione);


$select = "SELECT * FROM table ORDER BY 1";
$result = mysql_query($select);
$i=0;
while(list($id,$nom,$prenom) = mysql_fetch_array($result))
{
$variable[$i]="$id|$nom|$prenom";
$i++;
}

print("total=$i&variable=$variabel");
?>

nerzhul
September 23rd, 2003, 06:42 AM
print("total=$i&variable=$variable"); //error on name $variabel :)

nerzhul
September 24th, 2003, 04:20 AM
doh !!

my question is so hard ? noone can help me ? :(

eyezberg
September 24th, 2003, 04:37 AM
maybe if you'd 've given your question a better title, someone would've read it..
what's that mix of italian and french in your script? :)

in my opinion, PHP doesn't equate
$variabel and $variable ... typos, you know.. ;)

nerzhul
September 24th, 2003, 04:44 AM
no i know but when i write my exemple i write bad thing but i know that and it's not my problem (for the moment :) )

i just wanna know how a php's script can send result in text box and print to screen on the flash animation.

because all the things i read are so confuse and lot of all doesn't work :(

eyezberg
September 24th, 2003, 05:52 AM
print "&total=".$i

in flash, textfield variable is total => it will display i's value

nerzhul
September 24th, 2003, 05:57 AM
arf c'est aussi simple que ça ?

oups it's really simple as this exemple ?

i'am really a noobi :( i gonna try with simple things and after with array like $Tab[1]="toto|tata|tutu"; and print screen this value on different textfield :)

thx ;)

eyezberg
September 24th, 2003, 06:37 AM
bah ouais, pourquoi ce serait compliqué? lol :)

nerzhul
September 24th, 2003, 06:47 AM
bah ché pas :(

sinon on se sert aussi du LoadVars ? pour envoyer des variables saisis en flash vers le php pour qu'il les traite ?

nerzhul
September 24th, 2003, 06:48 AM
ha oui sinon je suis d'un niveau trés bon en php mais en flash je commence depuis 3 jours :( donc j'ai beaucoup d'idée mais pour le moment ralenti par les méthodologies, ça va aller je pense :p

merci en tt k de me répondre :)

eyezberg
September 24th, 2003, 09:29 AM
Pas de problème, et si jamais un jour j'ai un truc en PHP à te demander, je reviens vers toi ;)
Flash ça va, et depuis le bouquin "PHP for Flash", j'ai des bases en PHP (livre introuvable de friends of ED, n'est plus édité); tu peux aller voir sur le site support www.phpforflash.com, j'y suis toujours, au cas où...
LoadVars oui, regarde le 1e thread, je commence une espèce d'intro à la combinaison des 2... suggestions les bienvenues pour sujets à traiter..
And sorry to all non-french speakers :)

nerzhul
September 24th, 2003, 10:54 AM
merci je vais trainer mes guettres la bas aussi alors :p

sinon pour ton besoin d'aide en PHP pas de souci c'est mon job avec le java etc.. :)

Sorry For non french ^^ we stop speak french i promise !! :)

prstudio
September 24th, 2003, 11:19 AM
non continuez parlez, c'est bon

nerzhul
September 24th, 2003, 11:21 AM
=) ouep mais faut pas abuser alors :)