Jump to content
php.lv forumi

Problema ar vertības dabūšanu


Sephy

Recommended Posts

Tātad man ir datubāze no kuras es ierakstus ņemšu pēc virsraksta:

 

<?php

echo "<select style='margin-left:370px;margin-top:-20px;' name='galerija'>";

for($i = 1; $i <= $total_results; $i++){//total_pages cik ierakstu datubaze
  $check = mysql_query("SELECT * FROM news WHERE newid = '$i'");
  $infos = mysql_fetch_array( $check );
  echo "<option value='$infos[newsname]'>";
  echo $infos['newsname'];
  echo "</option>";

}
echo "</select><br><br>";

$derp=$_REQUEST['galerija'];
echo $derp;

?>

 

Vērtības parādās normāli(izvēlē parādās visi virsraksti datubāzē ka paredzēts), bet ar $_REQUEST neizdodas nolasīt ieraksta vērtību ;(, kur varētu būt problēma? Ar statiskām izvēles vērtībām viss strādā.

Edited by Sephy
Link to comment
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.

Loading...
×
×
  • Create New...