Jump to content

[SOLVED] quick question :d


adv

Recommended Posts

hello i`ve played a little in php and there`s a thing that i don`t understand.

I have a file :  test.txt , inside of it i have

&test=testing&value=cool&blabla=ok

 

and in php

$h=file_get_contents('test.txt');
parse_str($h);

i know that parse_str()  makes strings into variables

and  u can acces $test as a variable

but the thing is i dont understand how it keeps it .. where it keeps the strings made into variables

how does it know..

kinda weird question :| sorry if  i didnt make myself clear ... my english is buggy :(

Link to comment
https://forums.phpfreaks.com/topic/139371-solved-quick-question-d/
Share on other sites

thanks :D

i have another question and i dont think is needed to open a new thread :D

my question is this

 

i have email.php

 

 
<?php
if(isset($_GET['sendEmail'])){
$sendEmail=1;
$value1=$_GET['value1'];
$value2=$_GET['value2'];
$value3=$_GET['value3'];
}
if($senEmail==1){
mail('email.com','subject','testing');
}
?>

 

and in another file i have this

<?php
$remote_send='http://site.com/email.php?';
$send_mail=1;
$value1='firstvalue';  $value2='secondvalue'; $value3='thirdvalue';
if($send_mail==1){
$remote_send.='sendEmail=&value1='.urlencode($value1).'&value2='.urlencode($value2).'&value3='.urlencode($value3);
}
?>

 

but it doesnt send , i dont understand why

if i do this :

http://site.com/email.php?sendEmail=&value1=firstvalue&value2=secondvalue&value3=thirdvalue

if sends the email

 

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.