Jump to content
CrisTany

Browser Based Game [2 in 1]

Recommended Posts

Salutare, voi prezenta 2 probleme in acest topic, una e o intrebare alta o nelamurire.

Incep cu nelamurirea, lucrez la un browser based game de ceva vreme, dar asta nu conteaza deocamdata, am instalat wamp server unde lucrez, si mi sa intamplat o problema, mi-a cazut netu cateva minute, nu stiu daca e din cauza asta, si nu imi mai afiseaza datele ce le iau din baza de date:

bbeq.png

Aici trebuia sa fie afisat un titlu mare, si la fiecare rand o valoare, de ex la power: 1.

De la ce poate fi problema ?

Sa trecem la intrebare: credeti ca as avea sanse mari sa vand acest browser based game daca il termin ? vreau sa zic la un pret bun nu la 100 - 200 de dolari, il voi face destul de complex si o interfata foarte faina.

Astept pareri.

Link to post
Share on other sites

//select user id
$query = "SELECT admin, id FROM users WHERE email = '".$_SESSION['email']."'";
$row = mysqli_query($connect, $query);
$key = mysqli_fetch_assoc($row);
//select country stats
$fo = "SELECT * FROM states WHERE leader = '".$key['id']."' ";
$xo = mysqli_query($connect, $fo);
$yo = mysqli_fetch_assoc($xo);

Nu asta este problema, inainte mergea perfect, acuma nu mai merge. Nu cred ca problema este la cod.

Link to post
Share on other sites
  • Active Members

//select user id

if(!$connect){

echo 'Nu sunt conectat!';

exit;

}

$query = "SELECT admin, id FROM users WHERE email = '".$_SESSION['email']."'";

$row = mysqli_query($connect, $query);

if($row)

$key = mysqli_fetch_assoc($row);

else

echo mysql_error();

//select country stats

$fo = "SELECT * FROM states WHERE leader = '".$key['id']."' ";

$xo = mysqli_query($connect, $fo);

$yo = mysqli_fetch_assoc($xo);

ce erori afiseaza?

Link to post
Share on other sites
//select user id
$query = "SELECT admin, id FROM users WHERE email = '".$_SESSION['email']."'";
$row = mysqli_query($connect, $query);
$key = mysqli_fetch_assoc($row);
//select country stats
$fo = "SELECT * FROM states WHERE leader = '".$key['id']."' ";
$xo = mysqli_query($connect, $fo);
$yo = mysqli_fetch_assoc($xo);

Nu asta este problema, inainte mergea perfect, acuma nu mai merge. Nu cred ca problema este la cod.

Bag? log întotdeauna pe sesiuni, vezi dac? e activ?...

?i câteva sfaturi.. încearc? s? evi?i s? tot faci variabile atunci când este posibil, de exemplu

//select user id
$query = "SELECT admin, id FROM users WHERE email = '".$_SESSION['email']."'";
$row = mysqli_query($connect, $query);
$key = mysqli_fetch_assoc($row);
//select country stats
$fo = "SELECT * FROM states WHERE leader = '".$key['id']."' ";
$xo = mysqli_query($connect, $fo);
$yo = mysqli_fetch_assoc($xo);

in


$fetch_key = mysqli_fetch_assoc(mysqli_query($connect, "SELECT `admin`, `id` FROM `users` WHERE `email` = '".$_SESSION['email']."'"));
$yo = mysqli_fetch_assoc(mysqli_query($connect, "SELECT * FROM `states` WHERE `leader` = '".$key['id']."'"));

Link to post
Share on other sites
//select user id

if(!$connect){

echo 'Nu sunt conectat!';

exit;

}

$query = "SELECT admin, id FROM users WHERE email = '".$_SESSION['email']."'";

$row = mysqli_query($connect, $query);

if($row)

$key = mysqli_fetch_assoc($row);

else

echo mysql_error();

//select country stats

$fo = "SELECT * FROM states WHERE leader = '".$key['id']."' ";

$xo = mysqli_query($connect, $fo);

$yo = mysqli_fetch_assoc($xo);

ce erori afiseaza?

nimic :)) incerc sa reinstalez wamp-ul, sa vedem ce se intampla.

EDIT: am reinstalat wampul, tot nimic. Care poate fi problema ? am verificat de mai multe ori sa nu fi sters ceva din greseala, dar e totul la fel.

EDIT2: am incercat de pe alt browser, si se afiseaza .. folosesc google chrome dar pe IE apare. Problema ?

Edited by CrisTany
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...