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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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