Question:
Help in PHP Function Calling............?
ravi L
2011-07-02 23:15:39 UTC
hello, I have Two saprate hyper link with saprate ID, and on the click event of thees hyperlink i calls a php function. This function has a parameter which depends on the Number of Hyperlink.

Suppose the Link 1. sends the Parameter "Rose" and link 2. sends the parameter "Mango". now whats going on, when i click on link 2. it works fine the Mango goes as a parameter and value got saved, but when i click on the First link then it also sends the parameter "Mango" while it should send the "Rose", now it doesn't matter what link i click, it just sends only one parameter and that is "Mango". Can anybody pls tell me what i m doing wrong.
Pls help me in this i wasted a long time................... on this puzzle.

The Code is shown below-
--------------------------------------------------

PHP FUNCTION---->

function ChangeSaveDefaultView($NewView)
{
$con = mysql_connect("localhost","root");
mysql_select_db("filehost", $con);
$users = $_SESSION['MM_Username'];
$sql = "update useraccounts set useraccounts.DefaultView ='$NewView' where useraccounts.Email='$users'";
if (!mysql_query($sql,$con)){
die('Error: ' . mysql_error());}
mysql_close($con);

}

--------------------------------------------------------------------------------------------------------------
Hyper Link 1.
-------------------------------------

">



Hyper Link 2.
-------------------------------------

">
Four answers:
anonymous
2016-12-04 01:37:10 UTC
own domicile page applications in basic terms artwork via own domicile page records. however if that's a own domicile page record then basically upload that code anyplace you choose for it to artwork its stuff. you do no longer would desire to do any particular HTML tags to call a own domicile page tag - own domicile page tags are introduced into action as quickly because of the fact the server notices it.
Io amo la musica!
2011-07-02 23:23:42 UTC
The only thing I believe it could be is that you're not closing off you tags and one is within the other. From what I see it should work perfectly if the tags are closed off.... and the links DON'T have separate IDs.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...