Jump to content

display php data and store it in my sql


mohitgodiya

Recommended Posts

hey der....

m a newbie to php

and i dont know if this is the right place for this post.

i have a php code and i would like it to be displayed on the browser as well as store it in mysql server in i proper format....

i tried to work with cookies but got the data displayed in array format

please help me store it and display it separately i.e., name="XXXX" age="YY".........and so on

the code i used in cookies is as follows

<?php

  setcookie("name", $_POST["name"], time()+3600, "/","", 0);

  setcookie("age", $_POST["age"], time()+3600, "/", "",  0);

?>

 

when i retrieve the cookie data by    <?php print_r($_COOKIE)?> i get the output as:

Array ( [name] => mohit [age] => 22 )

last but not the least to put the value of the cookie in mysql

any help appreciated....

thnx

Link to comment
https://forums.phpfreaks.com/topic/261829-display-php-data-and-store-it-in-my-sql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.