Jump to content

Initializing Variables


Trium918

Recommended Posts

Should I do something like this.

 

<?
  // data_valid_fns.php

  // I can include this file in all my files
  // this way, every file will contain all my functions
  require_once("initialize_variables.php"); 
?>

<?
// data_vaild_fns.php
require_once("data_valid_fns.php"); 

username = $_POST['username'];
passwd = $_POST['passwd'];
passwd2 = $_POST['passwd'];
email = $_POST['email'];

?>

 

link=topic=135149.msg569612#msg569612 date=1176072802]

you dont have to split the require_once() into 2 diff php tags tho and you should use $ infront of the variables =) but i guess u allready know that... just wanted to point it out just in case

 

require_once is in two different files not tags.

 

require_once("data_valid_fns.php");  would be the

main file that connects every variable to all of the

other files.

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.