Jump to content
php.lv forumi

draugiem.lv


bobsters

Recommended Posts

tātad! Man uz ieteikt dr.lv links izskatas sadi

 

 

<a
href=\"http://www.draugiem.lv/say/ext/add.php?title={$showdata["text"]}&link=http://".$_SERVER['SERVER_NAME']."/anekdotes/index.php?p=anekdotes&{$showdata["id"]}&titlePrefix=jocins_spocins \">

 

 

un viss strada lielisiski tikai kad ievada visu un links paradas dr.lv lapa tad uzspiezot uz linka atveras pareiza lapa tikai apraujas pie anekdotes.

Neizvada visu urli piem http://xxx.lv/index....nekdotes&id=xxx

bet izvada http://xxx.lv/index.php?p=anekdotes

 

Ceru ka sapratat ko domaju

 

visadi esu meginajis bet dr.lv atmet manu tekstu kas ir aiz "&"

Edited by bobsters
Link to comment
Share on other sites

Simbols & atdala GET mainīgos. Tātad tavs id padodas ka jau pavisam cits mainīgais, nevis sastāvdaļa no link.

 

Risinājums ir šo mainīgo urlenkodēt - & pārtaisam par %26

echo '<a href="http://www.draugiem.lv/say/ext/add.php?title='.urlencode($showdata["text"]).'&link='.urlencode('http://'.$_SERVER['SERVER_NAME'].'/anekdotes/index.php?p=anekdotes&'.$showdata["id"]).'&titlePrefix=jocins_spocins">links</a>';

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