TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 09-04-2010, 08:10 AM   #1 (permalink)
The Visitor
 
Join Date: Sep 2010
Posts: 3
Thanks: 1
kicole is on a distinguished road
Default Can I post enquiry here?

Hi, I am new to this community and I am not advance in php.

I want to fix an error with a website link. The code in php shows below. I do not know if it is okay to post a website link here so I will not post yet.

Code:
<a href="<?php the_permalink(); ?>"><?php _e('full post ?','DailyNotes'); ?></a>

The code above shows a normal link however it is a blank page.
A normal link is similar to http://______.com/post/123.

A link which show the post is http://_____.com/?post=123.

Hence what can I do to the code above to add a question symbol and a equal symbol in the url link?

kicole is offline  
Reply With Quote
Old 09-04-2010, 03:15 PM   #2 (permalink)
The Addict
 
tony's Avatar
 
Join Date: Aug 2008
Posts: 336
Thanks: 8
tony is on a distinguished road
Default

So, if I understand it right, you want to convert a link like this http://website.com/post/123 to something like this http://website.com/?post=123?

In hard-coded simple terms it could be done with a replace of strings
php Code:
<?php str_replace('/post/', '/?post=', the_permalink()); ?>
tony is offline  
Reply With Quote
The Following User Says Thank You to tony For This Useful Post:
kicole (09-04-2010)
Old 09-04-2010, 03:46 PM   #3 (permalink)
The Visitor
 
Join Date: Sep 2010
Posts: 3
Thanks: 1
kicole is on a distinguished road
Default

Thank you for the reply Tony, however it did not fix the issue. Is it appropriate for me to post the website link here?
kicole is offline  
Reply With Quote
Old 09-04-2010, 03:49 PM   #4 (permalink)
The Addict
 
tony's Avatar
 
Join Date: Aug 2008
Posts: 336
Thanks: 8
tony is on a distinguished road
Default

I am not sure, but I would say it is fine as long is not spam or trying to advertise yourself. but since you are looking for an advice/critic/help if you ant to share it you can.
tony is offline  
Reply With Quote
Old 09-04-2010, 04:29 PM   #5 (permalink)
The Visitor
 
Join Date: Sep 2010
Posts: 3
Thanks: 1
kicole is on a distinguished road
Default

http://pastebin.com/qmhkUzd3

Above is a page with codes that doesn't work the way it should.

I am using a wordpress blogging software and I need to fix the permalink to view a correct post.

Cheers.
kicole is offline  
Reply With Quote
Old 09-04-2010, 04:51 PM   #6 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

For clarity, this is not a PHP issue but a WordPress one. The first thing you need to try is to flush your rewrite rules and double check the permalink structure you are attempting to use, as /post/123/ is not by any means a default setup; go to Settings >> Permalinks, and choose the structure you would like to use (most commonly 'Month and name', aka '/%year%/%monthnum%/%postname%/') then click Save Changes.

After you do that, go to Posts, and hover over a post title until the action links appear. Click 'View' and your permalink structure should be working. If it's still not at this point, I would check to see if your .htaccess file was created properly (WordPress will usually notify you if it is not, but check anyways), and failing that you should check into whether or not you even have .htaccess capabilities on your host.
__________________
uʍop ǝpısdn sı ɹǝʇndɯoɔ ɹnoʎ sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
delayedinsanity is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Edit post with CodeIgniter Jmz General 5 11-28-2009 01:53 PM
My post shows up as NEW allworknoplay Feedback 5 05-06-2009 01:35 PM
fetch data in a form without using post? kororo203 Absolute Beginners 5 05-14-2008 01:37 AM
Post your desk Haris The Lounge 18 12-15-2007 11:21 PM


All times are GMT. The time now is 02:40 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design