jenny5
-
Posts
5 -
Joined
-
Last visited
Posts posted by jenny5
-
-
ok, now i finally got it to work by just taking the "ip" form value via this code:
https://www.codegrepper.com/code-examples/php/how+to+get+ip+address+of+client+using+phpbut now there is that charset issue lol
(plus it seems to add my own email address to the end of the email every time - i have only set it to be the 'send to' address, nothing else) -
ok, but now the charset wnet crazy a bit and "charset=ISO-8859-1" doesn't seem to work anymore...
and should i start the newly renamed file with some php code now? it's like this atm:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
(plus the ip box is completely empty now) -
i basically have the main form page as .html atm, but should i convert it to php then somehow to get that "value= echo" part to work?
currently i have the php part in the 'action' part like this:
<form action="getdata.php" method="post" name="name"> -
so i've been trying to figure this out for a long time already, but still don't get it how does this "get_ip" thing turns out inside the email in the end?
https://stackoverflow.com/questions/51067389/how-to-get-ip-address-from-html-form-using-php
and how can you use the "<?php echo $ip ?>" code inside an html form in the first place if it is only html and not even php at all? (aka the ¤value="<?php echo $ip;?>"¤ part doesnt even work at all and only displays the same exact code instead of the ip...)
plus where should it display the "<script>var ip = "<?php echo $ip;?>"; </script>" part when i can only insert scripts into the <head> part and not in the <body> section?
How to get the ip address from an Html form?
in PHP Coding Help
Posted · Edited by jenny5
lol.. now i fixed the charset issue with this (except in the actual email title in the inbox):
<?php header('Content-type: text/html; charset=iso-8859-1'); ?>
<!DOCTYPE HTML>
<head>
<meta name="x" content="y" />
so now the only issue is that own email address at the end of the email...