Jump to content

kannu

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kannu's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hey guys, i initialized a session variable in the following manner :- <?php $_SESSION['test12'] = "<td><span id=\"custom_carat\">".$row_prod['total_carat_weight']."</span><span id=\"center_diamond1\">".$default_diamond['shape']."</span>"</td>"; echo $_SESSION['test12']; ?> This works well, and the Session "Test12" is initialized. Based on the user selection the above script is then called many times, each time the session value is updated, as I have the echo statement to check it However, when I access the session variable from the next page by using the echo statement, only the first initalized value is given and not the further changed value as there might be. Can you tell me please if there is something that I am missing in this. thanks
  2. man, thanks LoneWolf217, that worked like a charm, i was trying to figure it out for over 2 hours. thanks again
  3. hey guys, i have a html output which comprises of various variables where there values change on user selection, and their combined result together is output in html as a string the following is the code <td><span id="custom_carat"><?=$row_prod['total_carat_weight']?></span> Carat <span id="center_diamond1"><? echo $default_diamond['shape']; ?></span> <?=substr(substr(stripslashes($row_prod['product_name']),11),0,-14) ?><span id="custom_gold1"><?=$default_gold['text']?></span> Gold </td> Is it possible that I can assign the entire output of the above to a php variable. if you can please let me know thanks
  4. hi Mark thanks for the help. i am learning and still novice in php. but your code works perfectly now. thanks again, and i really appreciate the same thanks
  5. hi mark, i am getting a syntax error in the code if ($urlData[''scheme] == 'http') { $url = 'https'.substr($url,4); } can you double check this thanks
  6. hello, i have a string $row_cart['prod_img'] which contains the website address which would either being with http or https . how can i check if it begins with htttp, then to replace it with https if you can please help me out on this. thanks
  7. hello thank you guys for taking time to help me out, but sorry if i was not clear in my initial post. the <td class="decsription_bg2"><b><span id="custom_carat"><?=$row_prod['total_carat_weight']?></span> Carat <span id="custom_carat12"><?=$row_prod['total_carat_weight3']?></td> the above is not the complete code, but the whole line is comprised of various variables which combine together to produce a string text, which changes based on user selection of different options. i want to capture and assign the entire final string text produced by the above, and assign it to one variable. how can i do the same. thanks
  8. hello, i am a newbie so please excuse if this is an obvious question but after 3 hours of research and trying different syntax, i cannot figure this out. i have the following code in the body section which works perfectly, which basically generates a string text. <td class="decsription_bg2"><b><span id="custom_carat"><?=$row_prod['total_carat_weight']?></span> Carat </td> What I want to do is to store the text generated by the above code to a variable which i can pass alont to the next page. what should i add after the above line, to store this in a variable and to pass it along the next page. the page is currently using "post" method. any help would be really appreciated. thanks
  9. hello, I have a Session variable, where value is stored based on user selection. However, I want to restore the value of the variable to a default value, everytime the user loads the page again (such as refreshing the page, or by hitting the back/forward button on his browser). Therefore each time the page is loaded again, I want to restore the value of session variable to a default value. How can I do this, if someone can please help me out. thanks ps: I have already tried following which has not worked: I tried $_SESSION['passMe']= some default value; as the first line inside the <body> tag, thinking the the session variable value would be restored to default value each time the page loads again, but this does not happen. the variable value is not restored, and it retains the user selection.
  10. hey, thanks guys to all of you for all the help and time to sort my problem. I am finally able to work it out, and a special thanks to member "xtopolis" whose solution was the one that worked thanks again
  11. I am posting the same question again, using the code tags, so that it is easier to understand. I have the code session_start() at the beginning of my script already. My question is, if someone can help me:- Hello, I passed the variable from 1st to 2nd page successfully with the following code: 1st Page code <form action="a2008.php" method="POST"> <input type="hidden" id="answer" name="answer" value="<?php echo $_SESSION["answer"] ?>"/> <input type="image" name="submit" src=button.jpg" /> </form> 2nd page code to retrieve the variable:- <? $answer=$_POST['answer']; echo $answer; ?> This retrieves the value successfully. Now, I need to pass it to the third page and I use the following code as used before, but it does not work:- <form action="conf.php" method="POST"> <input type="hidden" name="answer" value="<?php echo $_SESSION["answer"] ?>"/> <input type="image" name="submit" src="button.jpg" > </form> When I try to retrieve it on the 3rd page, I do not get any value. Can you please help me out at this. I have spent over 5 hours to work this out, and I dont know how, I am new to the php coding. thanks
  12. Hello, I passed the variable from 1st to 2nd page successfully with the following code: 1st page code:- <form action="a2008.php" method="POST"> <input type="hidden" id="answer" name="answer" value="<?php echo $_SESSION["answer"] ?>"/> <input type="image" name="submit" src=button.jpg" /> </form> 2nd page code to retrieve the variable:- <? $answer=$_POST['answer']; if ($answer !="layaway") { $answer = "complete"; } echo $answer; ?> This retrieves the value successfully. Now, I need to pass it to the third page and I use the following code as used before, but it does not work:- <form action="conf.php" method="POST"> <input type="hidden" name="answer" value="<?php echo $_SESSION["answer"] ?>"/> <input type="image" name="submit" src="button.jpg" > </form> When I try to retrieve it on the 3rd page, I do not get any value. Can you please help me out at this. I have spent over 5 hours to work this out, and I dont know how, I am new to the php coding. thanks
  13. hello thanks for the reply. yes, i would have to pass the status of the radio button to another page also. but before i do that, i would want to store the status of the radio button to the variable $selt in the same page also. if you can please tell me how can i check the status of the radio button in another page, and how can i store its value to variable $selt in the same page. thanks for help, i am really new in this.
  14. hello, I have a php, html page. I plan to use two radio buttons echo" <input type='radio' name='payment_type' value='complete' checked> Complete <input type='radio' name='payment_type' value='incom'>incom "; I have a question: Before the user exists this page, I want to check the value of the radio button and store it in the variable $selt Can you please tell me how can I do the same. sorry I am very novice in php thanks
  15. hello, i have godaddy ssl installed on my website, and i am using the following code RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R] This makes the entire website come as "https" however i only want certain pages to come in "https" and the rest in "http". can anyone please help me out. i would really appreciate the help. thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.