@ $db = mysql_pconnect ("localhost", "mpletiko", "575414"); if (!$db) { echo "Error: Could not connect to database. Please try again latter."; exit; } mysql_select_db("drstudent"); $query1 = "select RedniBroj from Anketa_pitanja"; $result1 = mysql_query($query1); $num_results1 = mysql_num_rows($result1); $max=0; for ($i=1; $i<$num_results1+1; $i++) { $row1 = mysql_fetch_array($result1); $b_max = stripslashes($row1["RedniBroj"]); if ($b_max>$max) { $max=$b_max; } } $query = "select * from Anketa_pitanja where RedniBroj='$max'"; $result = mysql_query($query); $num_results = mysql_num_rows($result); $row = mysql_fetch_array($result); echo "
"; echo stripslashes($row["Pitanje"]); echo "
"; for ($o=1; $o<8; $o++) { if ($row["Odgovor".$o] == null) { $broj=$o; $o = 8; } } $p=$broj*80; echo '
'; for ($i=1; $i<$broj; $i++) { echo '
'; echo '
'; echo '
'; echo stripslashes($row["Odgovor".$i]); echo "
"; } echo '
'; $RB = stripslashes($row["RedniBroj"]); echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; ?>
TKO ŽELI BITI RADILICA?
Neka se javi na
dr.student@student.mef.hr
s naznakom ZA RADILICU.