PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
mhulse
Forum Commoner
Posts: 41 Joined: Fri Jun 11, 2004 12:50 am
Post
by mhulse » Sun Jun 13, 2004 4:03 am
Hi all,
I am having troubles getting this to validate (XHTML 1.0 Transitional):
Code: Select all
echo " <a href="$PHP_SELF?action=delete&id=$key">Delete</a>\n";
echo " <a href="$PHP_SELF?action=edit&id=$key">Edit</a>\n";
Putting them in vars did not seem to work... And yes, I am a PHP noob, sorry
Any suggestions?
Thanks in advance!
Cheers
<m />
markl999
DevNet Resident
Posts: 1972 Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)
Post
by markl999 » Sun Jun 13, 2004 4:05 am
Try:
echo '<a href="'.$_SERVER['PHP_SELF'].'?action=delete&id='.$key.'">Delete</a>'."\n";
echo '<a href="'.$_SERVER['PHP_SELF'].'?action=edit&id='.$key.'">Edit</a>'."\n";
mhulse
Forum Commoner
Posts: 41 Joined: Fri Jun 11, 2004 12:50 am
Post
by mhulse » Sun Jun 13, 2004 4:13 am
Wow! Fast response! Thanks!
I gave that a shot, but the validator still does not like this part:
This is the only part of my page that does not validate... am I being too anal about making my pages compliant?
launchcode
Forum Contributor
Posts: 401 Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:
Post
by launchcode » Sun Jun 13, 2004 4:33 am
You cannot use & for XHTML Transitional - change to &
mhulse
Forum Commoner
Posts: 41 Joined: Fri Jun 11, 2004 12:50 am
Post
by mhulse » Sun Jun 13, 2004 4:45 am
Thanks guys! Perfect XHTML validation:
Code: Select all
echo '<a href="'.$_SERVERї'PHP_SELF'].'?action=delete&id='.$key.'">Delete</a>'."\n";
echo '<a href="'.$_SERVERї'PHP_SELF'].'?action=edit&id='.$key.'">Edit</a>'."\n";
Thanks for helping me out, I really appreciate it!
Cheers
<m />