PDA

View Full Version : My Thread of Php Questions..Please Help


DrkFusion
09-15-2002, 01:31 AM
Ok in php there is the mdir() fuction I want to know how to make 2 folders on one session, so if I create ww2, it will automatically create another folderwithin called ww3 or something.

Thanks in Advance
Regards
-Arunan

DrkFusion
09-15-2002, 02:14 AM
I found out how, now what is the function for creating a file? and adding content to it via a script?

DrkFusion
09-15-2002, 02:34 AM
Ok I found out how to make the file too.
:)

DrkFusion
09-15-2002, 01:31 PM
How do I make a file dynamically and put php into it?

DrkFusion
09-15-2002, 01:37 PM
How would I be able to use copy() to copy a file from my server to a another folder?

Chris M
09-15-2002, 01:38 PM
Somebody will help soon;)

Satan

DrkFusion
09-15-2002, 01:39 PM
Hopefully.

Chen? Teck? Xenon? gForce? Neo ;) Others?!

Chris M
09-15-2002, 01:45 PM
Damned MyChenQL errors;)

What else do you need help with? Perhaps I can look even more blank;)

Satan

DrkFusion
09-15-2002, 03:31 PM
How do you connect to that anyways?!

Yet I have another question, since I am new to php.

How do I array 2 variables in a database, so that it can be looped enough times as it is needed, so if there are 6 rows of content, the aray will be outputted 6 times.

I learned this awhile back, but I havn't used it in awhile, because I stopped doing php.

Anyways, thanks in Advance Again

Regards
-Arunan

DrkFusion
09-15-2002, 03:40 PM
Bleh, I found out the above as well -_-

DrkFusion
09-15-2002, 06:30 PM
How to remove dir?

with the rm() function?

Thanks again in advanced again
Arunan

DrkFusion
09-15-2002, 06:54 PM
OK I found out how to remove dir too.. -_-

Is there a rename dir function?

DrkFusion
09-15-2002, 08:30 PM
How do you make a drop down menu, something like the makeforumchooser() but for your own personal option?

Thanks again in Advanced

Arunan

DrkFusion
09-15-2002, 10:44 PM
OK I am still hanging here from the question above, and I also have this question, with the list() function, how would I exclude certain files from being viewed?

Thanks again
Drk

Neo
09-15-2002, 11:04 PM
give me a few ot answer them.. even know they are mostly the same question oO;;;;;

DrkFusion
09-15-2002, 11:18 PM
Lol...not really they all output something different, and they are all used differently.

Anyways, yes I will :)

-Arunan

E
09-17-2002, 10:40 AM
well.. the drop down menu...

ud probably have to expand more but its pretty much a while statement

like say u wanna select the name of 5 users and there posts (ordered by posts_) and make it so u select one and click go it would goto there profile......

u first start with the variable that selects it from the database

$getinfo=$DB_site->query("SELECT * FROM user ORDER BY posts DESC LIMIT 5");
make sure it says query not query first or it will produce an error.... now for the loop that makes the options

while ($options=$DB_site->fetch_array($getinfo)) {
$results .= "<option value=\"$options[userid]\">$options[username] - $options[posts]Posts.</option>";
}

now all u need is the html to run the page... hehe simple form...

<form name="selector" action="https://vborg.vbsupport.ru/member.php?s=&action=getinfo&userid=$userid" method="post">
<select name="userid">
<? echo("$results"); ?>
</select><br>
<input accessKey="s" type="submit" value="Go"></form>

and thats it all done :)


[/php]

DrkFusion
09-17-2002, 07:03 PM
You are very smart man, how about if you want to loop a template?

And no database info is used? How would I go about doing that.

Thanks

E
09-19-2002, 09:20 AM
well.. wat exactly do u want to loop?