Forum Topic: Php - Change Variable Then Save

(119 views • 2 replies)

This topic is 1 page long.

<< < > >>
None

Alstertheonly

Reply To Post Reply & Quote

Posted at: 11/7/09 07:28 PM

Alstertheonly DARK LEVEL 11

Sign-Up: 10/19/07

Posts: 226

Heya Newgrounds

How can I change a variable in another file then save that variable - without overwriting the file I already have. Here's what I've got at the moment:

<?php 
$newwebsiteurl = $_POST["websiteurl"];
$configurl = "../config.php";

$handler = fopen($configurl, 'a') or die("Can't open conig.php. Please check file path in scripts/savesettings.php.");
$siteurl = $newwebsiteurl;
fclose($handler);
header("Location: ../index.php");
?>

I didn't think the above would work but it was worth a shot.

StreetEye Studios- My Website
Visual Basic, Java, PHP and C++ guy.
Web Designer.


None

Jon-86

Reply To Post Reply & Quote

Posted at: 11/7/09 09:54 PM

Jon-86 NEUTRAL LEVEL 13

Sign-Up: 01/30/07

Posts: 3,948

Hooow you

use pointers

Google that

PHP Main :: C++ Main :: Java Main :: irc.freenode.net

BBS Signature

None

Alstertheonly

Reply To Post Reply & Quote

Posted at: 11/8/09 10:26 AM

Alstertheonly DARK LEVEL 11

Sign-Up: 10/19/07

Posts: 226

That's not really helping...

StreetEye Studios- My Website
Visual Basic, Java, PHP and C++ guy.
Web Designer.


All times are Eastern Standard Time (GMT -5) | Current Time: 10:56 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!