Jump to content

Newbee Questions Concerning Functions - Arrays - $_POST


arhunter

Recommended Posts

I have three questions to pose....

 

1) Can you use an array or pass an array to a function... Example

 

$Returned_Result  = AFunction($Var1,$Var2,$Array1(),$Array2());

 

2) Can you read inbound data in side a function...Example

 

AFunction($Var1,$Var2,$Array1(),$Array2()){

 

    $Array1[0][0] = $_POST["Var1"];

    $Array1[0][1] = $_POST["Var2"];

    $Array1[0][2] = $_POST["Var3"];

 

// Code here

 

  $Result = $Value determined by results of Code;

  return $Result;

}

 

3) Is there a function call simular to stripslashes that will make a url safe to store into a MYSQL data base...example..

 

$URL = "http://www.domain.com/dir1/~dir2/action=strangecharhere?&var=123&var2=abc&var3=specailchar";

 

$URL = MysteryFunctionHere($URL);

 

$Restult = StoreUrltoDB($URL);

 

later you can recall the $URL as a AREF link.

 

 

Hope this isn't the wrong place to ask. New to the system.

 

 

 

 

 

 

 

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.