Jump to content
php.lv forumi

Labot - gan teksts, gan nosaukums


laucinieks

Recommended Posts

Pēc šī koda -

 

 
   echo '<td><a href="admin_lv.php?action=edit&id='.$row['id'].'">Labot</a></td>';

{
 $id = $_GET['id'];
 $sql = sprintf('update zinas set nosaukums = "%s", teksts = "%s" where id = %s', $_POST['nosaukums'], $_POST['teksts'], $id);
 mysql_query($sql) or die(mysql_error());
}

if ($_GET['action'] == 'edit')
{
 $id = (int)$_GET['id'];

 $sql = 'select * from zinas where id = '.$id;
 $data = mysql_query($sql);
 $row = mysql_fetch_array($data);

 

Parādās tikai nosaukums, bet ir vajadzīgs, lai parādītos arī teksts. Kāpēc man neparādās teksts?

 

EDIT: izlaboju pats, biju ielaidis kļūdu HTML kodā, var vērt ciet.

Edited by laucinieks
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...