Jump to content
php.lv forumi

href + Query


snach15

Recommended Posts

tātad ar submit pogu es zinu kā to panākt bet kā to vari izradīt ja man ir nevis submit bet gan vnk links?

<a href=?news=$row[1]Lasīt ziņu</a>

un gribu panākt lai pēc tam kad tiek uz šitā uzkikšķināts tad notiek MSSQL query

mssql_query("update ST_News set izlasits_reizes = izlasits_reizes + 1 where news_id='$news_id'");

Link to comment
Share on other sites

Kemito, tur runa neiet par pašu pieprasījumu, bet gan to, kā lai ar linka palīdzību izsauc pieprasījumu.

 

 

news.php:

 

<a href="<?= ROOT; ?>/do__read_count.php?id=<?= $database['id']; ?>">Lasīt!</a>

 

do__read_count.php:

 

$id = $_GET['id'];

// Validācija.

// Pieprasījums.

exit( header( "Location: {$root}/news.php" ) );

 

 

P.S. "Uz ātru roku"... xD

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