Page 1 of 1

Editing a PHP file from a form...

Posted: Sat Apr 22, 2006 1:48 pm
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]

Posted: Sat Apr 22, 2006 2:09 pm
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?

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

Posted: Sat Apr 22, 2006 2:30 pm
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 :)

Posted: Sat Apr 22, 2006 7:44 pm
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: