Jump to content
  • 0

Функция HERE


angelShlesser
 Share

Question

<? 
if (!isset($id))

{
$result = mysql_query("SELECT title,id FROM nov");
$myrow = mysql_fetch_array($result);

do
{
printf ("<p><a href='edit_nov.php?id=%s'>%s</a></p>",$myrow["id"],$myrow["title"]);
}

while ($myrow = mysql_fetch_array($result));

}



else

{

print <<<HERE
<form id="form1" name="form1" method="post" action="add_nov.php">
<p>
<label>Введите название новости<br />
<input type="text" name="title" id="title" />
</label>
</p>
<p>
<label>Краткое описание для новости<br />
<input type="text" name="meta_d" id="meta_d" />
</label>
</p>
<p>
<label>Введите ключивые слова<br />
<input type="text" name="meta_k" id="meta_k" />
</label>
</p>
<p>
<label>Введите дату добовления новости <br />
<input name="date" type="text" id="date" value="2009-02-27" />
</label>
</p>
<p>
<label>Введите краткое описание новости
<textarea name="description" id="description" cols="40" rows="5"></textarea>
</label>
</p>
<p>
<label>Водите полный текст новости<br />
</label>
<label>
<textarea name="text" id="text" cols="40" rows="20"></textarea>
</label>
</p>
<p>
<label>Введите автора новости</label>
</p>
<p>
<label>
<input type="text" name="author" id="author" />
</label>
</p>
<p>
<label>
<input type="submit" name="submit" id="submit" value="Пошол" />
</label>
</p>
</form>


HERE;
}

Не могу понять в чём проблема когда нажимаю на ссылку то должна появлятся форма редактирования но нечего не происходит где мой касяк? Проверил не 1 раз немогу найти

Edited by angelShlesser
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

У вас нет выборки из бд для заполнения полей формы

else {

$result = mysql_query("SELECT * FROM откудато WHERE id=$id");

$myrow2 = mysql_fetch_array ($result2);

print <<<HERE ............................

Edited by woofs
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   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.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy