Editing a PHP file from a form...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Maluendaster
Forum Contributor
Posts: 124
Joined: Fri Feb 25, 2005 1:14 pm

Editing a PHP file from a form...

Post by Maluendaster »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi again, i have 2 questions.. First is how can I edit a PHP file (called cat.php), from a form.. the cat.php doesn't contain php code, here it is...

Code: Select all

Guitars
Bass
Drums
This is the category file, for example, if I want to add or delete or edit a category, how can i do that?? can anyone point to some tutorial, i've serached and i haven't found anything I can understand good... :oops:

The second question is the same, but the PHP file contains this (config.php):

Code: Select all

<?php
$usuario = 'user_name';
$password = 'password';
$nombre = 'Name';
$direccion = 'Address';
$titulo = 'Site Title';
$to = 'mail@mail.com';
$curency = " U$S";
$footer = "All rights Reserved";
?>
Thank you!


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
method_man
Forum Contributor
Posts: 257
Joined: Sat Mar 19, 2005 1:38 am

Post by method_man »

why do you have a .php file with absolutly no php or any other code?

and what do you mean edit it from a form?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Re: Editing a PHP file from a form...

Post by timvw »

Maluendaster wrote:Hi again, i have 2 questions.. First is how can I edit a PHP file (called cat.php), from a form.. the cat.php doesn't contain php code, here it is...
You've got many options. You can start at http://www.php.net/file and follow the links to various file manipulation functions from there...
Maluendaster wrote: This is the category file, for example, if I want to add or delete or edit a category, how can i do that?? can anyone point to some tutorial, i've serached and i haven't found anything I can understand good
Basically, you need to write a new file, with the added or without the removed rows..
Maluendaster wrote: The second question is the same, but the PHP file contains this (config.php):
Equal questions get equal answers :)
Maluendaster
Forum Contributor
Posts: 124
Joined: Fri Feb 25, 2005 1:14 pm

Post by Maluendaster »

method_man wrote:why do you have a .php file with absolutly no php or any other code?

and what do you mean edit it from a form?
Its a script that i downloaded, i didn't write it, so i can't answer your question.... if you want to check it out, here's the site..

http://www.rocoder.3x.ro/maranshop.php

Thanks timvw for the answer :P , and sorry for posting without the apropiate tags... :oops:
Post Reply