Web Design Forum: php & <a href - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

php & <a href Rate Topic: -----

#1 User is offline   Faevilangel 

  • Wordpress Ninja.....
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,166
  • Joined: 11-May 09
  • Reputation: 57
  • Gender:Male
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 23 July 2009 - 12:31 PM

im calling an api from a form action, and i can't for the love of me get the php to work

http://wwww.mydomain....php?user=<?php echo $_post['user']; ?>

anyone have any ideas why yhat doesn't work ?
0

#2 User is offline   Connetu_C 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 427
  • Joined: 12-December 08
  • Reputation: 25
  • Gender:Male
  • Location:London, UK
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 23 July 2009 - 12:55 PM

I don't quite understand what you mean: "doesn't work" is a bit vague. Is it that your server isn't processing the PHP code at all (and outputting directly to the response)? Or that the PHP code itself is executing but failing to do what you think (with or without an error)? If the former, check the MIME types and handlers on your Web server because it isn't processing the page. If the latter, we'd need more information.

Also you give the URL above but don't show the context in which it's being used: some surrounding code would be useful to give a better idea of what you're trying to do. :)
0

#3 User is offline   Faevilangel 

  • Wordpress Ninja.....
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,166
  • Joined: 11-May 09
  • Reputation: 57
  • Gender:Male
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 23 July 2009 - 01:04 PM

the whole code is above ...

im taking a form data and putting into the link ...

the link is processing but not doing the php part, e.g. instead of display items by the user, its display the normal output

if i put mydomain.com?user=faevilangel then it works, what i want to do is put the forms data straight into the link
0

#4 User is offline   skidz 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,047
  • Joined: 24-November 08
  • Reputation: 135
  • Gender:Male
  • Location:Derby
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 23 July 2009 - 01:40 PM

Try changing

$_post

to
$_POST

0

#5 User is offline   Connetu_C 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 427
  • Joined: 12-December 08
  • Reputation: 25
  • Gender:Male
  • Location:London, UK
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 23 July 2009 - 01:50 PM

So to clarify what you're saying, the page is coded as this:

http://wwww.mydomain....php?user=<?php echo $_post['user']; ?>

and when you invoke this page via a POST you get this output to the response:

http://wwww.mydomain....php?user=<?php echo $_post['user']; ?>


In other words, your Web server isn't recognising this page as a PHP script and processing it with an appropriate handler? What is your script called (e.g. does it end in .php)?
0

#6 User is offline   Faevilangel 

  • Wordpress Ninja.....
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,166
  • Joined: 11-May 09
  • Reputation: 57
  • Gender:Male
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 24 July 2009 - 03:47 PM

View PostConnetu_C, on 23 July 2009 - 01:50 PM, said:

So to clarify what you're saying, the page is coded as this:

http://wwww.mydomain....php?user=<?php echo $_post['user']; ?>

and when you invoke this page via a POST you get this output to the response:

http://wwww.mydomain....php?user=<?php echo $_post['user']; ?>


In other words, your Web server isn't recognising this page as a PHP script and processing it with an appropriate handler? What is your script called (e.g. does it end in .php)?


yeah its a php page

its an api script, i do a call to the api to get the response but trying to do it a little different

the api says to do it as widget.php?&user=faevilangel, where the name is coded in before, im just trying to allow someone to enter the name instead of me having to handcode 120,000 names (its a forum api)
0

#7 User is offline   skidz 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,047
  • Joined: 24-November 08
  • Reputation: 135
  • Gender:Male
  • Location:Derby
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 27 July 2009 - 03:17 PM

if you tryed changing $_post to $_POST you could try changing $_post to $_REQUEST (Wouldn't leave it like this, purely for testing)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users