A2xA
-
Posts
137 -
Joined
-
Last visited
Never
Posts posted by A2xA
-
-
thanks! That seems to be what I was looking for
-
I have a script that makes a game hub for a member. It is using mkdir and then chmodding it. If the folder already exists then it gives me this error:
Warning: mkdir() [function.mkdir]: File exists in "SHOWS MY DIRECTORY" on line 6
This is an ugly/bad error message + it isn't good for security because it shows my file directorys. If someone could tell me how to fix this I would be grateful.
Thanks!
-
I want to make a textarea that is titled news. Would I just make a textarea? I've tried doing things, but it just makes a box and not the physical scrollbar like on the side of the browser. Thanks!
-
okay thanks, I have fixed the forms with form validation and re-directed members that haven't joined. And deleted all files that needed to be deleted.
Thanks for the advice and help!
-
I wan't to make my form secure. Which means no / or < or leave it blank. You get my point. Would it be best to add it to the code that the form is processing, or the actual form itself? If you could point me to a tutorial I could also follow that. I just couldn't find anything!
Form Code:
<form name="hubmove" action="taken out" method="post"> <h3>Step 1. Enter Hub ID or Name To Make Hub, Then Come Back And Proceed to Step 2<h3> <input name="dir" value="" type="text"> <INPUT TYPE="submit"> </form>
Processing code:
<html> <?php $dir = $_POST[dir]; mkdir("taken out", 0755); chmod("taken out", 0777); ?> <h3> Click <a href="taken out">Here</a> to return back to hubs Complete Step 2. To Activate your Hubs<h3> </html>
Thanks, I appreciate it! I need to secure my stuff so I can release it. This is the last step. All who helps Thanks!
-
oh and thanks for the compliment by the way. Your site is cool too!
-
-
can you tell me how to fix some of this stuff because apparently I'm not very good at securing my script :-\
-
Okay I managed to delete the stuff before it could do any damage. Once again thank you for whoever was doing that. It even screwed up the chat. Anyways....can someone help me make this more secure. It's apparently easy to get into because within 30 seconds of opening this thread it happened
-
Dammint I guess it wasn't secure. Some people made some stuff that I didn't want and I was "Hacked" I guess. On the folders option they made it and now I can't delete it. My site is on maintenece now. Thanks guys I really appreciate it.
-
On My site http://wiicharged.com I have made the game hubs option. Right now the options that I'm wanting you to test out are the create a hub and join a hub option.
The hub can be found here http://wiicharged.com/index.php?action=hubs
First thing to test security:
Make the hubs.
http://wiicharged.com/index.php?action=hubs;sa=make;
How this works is when they create a hub the first step actually creates the folder and the second step copyies the main "hub" files from a directory to their folder. When they think their confirming it or whatever (clever )
Second thing to test security
Join the hubs/actual hub itself
http://wiicharged.com/index.php?action=hubs;sa=join;
The user types in their "hub ID" and it pops up their "hub" Which is a flash file that writes to a txt file.
Don't bash it up too much. It's my first script and I plan to add more later. As for the visual aspect of it. I'm not done. I just tried to put the main stuff in there (the script) Please tell me how I can improve the security of my script before I release it? Thanks!
-
Wait, Nevermind, I fixed it. Now it is working without the re-sizing. Do you know why it isn't re-sizing?
<html> <head> <SCRIPT LANGUAGE="JavaScript"> <!-- Idea by: Nic Wolfe --> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> function popUp(URL) { day = new Date(); id = day.getTime(); window.open(URL, id , 'toolbar=0','scrollbars=0','location=0','statusbar=0','menubar=0','resizable=0','width=275','height=300'); } </script> <title>Join The WiiCharged Hub</title> </head> <body> <input type="button" value="Open the Hub" onclick="popUp('http://wiicharged.com/hubchat/<?php $dir = $_POST[hubid]; echo$dir; ?>/shout.swf');" /> </body>
-
thank you so much. It's actually working now.
There's two problems.
The variable is inserted with a space?
And the document isn't re-sized to my measurements
Thanks!
-
Um...I corrected it and it..stil won't work... ???
<html> <head> <SCRIPT LANGUAGE="JavaScript"> <!-- Idea by: Nic Wolfe --> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin function popUp(URL) { day = new Date(); id = day.getTime(); window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=275,height=300');"); } // End --> </head> </script> <form> <input type=button value="Open the Hub" onClick="javascript:popUp('<?php $hubid = $_POST[hubid]; $file = 'http://wiicharged.com/hubchat/$dir/shout.swf'; echo $file;?>');" /> </form> </html>
Sorry :-X
-
Well, I sort of need it to pop up. I did what you said, but the submit button still isn't working :-X
New code:
<html> <head> <SCRIPT LANGUAGE="JavaScript"> <!-- Idea by: Nic Wolfe --> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin function popUp(URL) { day = new Date(); id = day.getTime(); window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=275,height=300');"); } // End --> </head> </script> <body> <form> <input type=button value="Open the Hub" onClick="javascript:popUp('<?php $hubid = $_POST[hubid]; $file = 'http://wiicharged.com/hubchat/$dir/shout.swf'; echo $file;?>'); </form> </body> </html>
-
hahha wow I always seem to overcomplicate things. Thanks!
-
Yeah, I'm editing the script. I just don't know how to do both php and javascript at the same time. I've been working on it for a few days now. That's why I came here.
-
I'm making it where the user types in their 'hub' and it brings them to it.
the form for the page before (to send the variable) is:
<form action="/hubs/main.php" name="join" method="post"> <input type="text" name="hubid"> <input type="submit"> </form>
the next page where the data is sent to is:
<html> <head> <SCRIPT LANGUAGE="JavaScript"> <!-- Idea by: Nic Wolfe --> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=275,height=300');"); } // End --> </head> </script> <body> <form> <input type=button value="Open the Hub" onClick="javascript:popUp('<?php $hubid = $_POST[hubid]; $file = 'http://wiicharged.com/hubchat/$dir/shout.swf'; echo $file;?>'); </form> </body> </html>
The main problem is getting the variables to transfer over from the php to the java (and the submit button not working)
Thanks! all help is appreciated! Where it is is at http://wiicharged.com/index.php?action=hubs;sa=join;
-
I want a user to type in the form their hub ID. Then a window pops up with the desired url.
ie:
The user types in the $hubid. Then http://wiicharged.com/hubchat/$hubid/chat.html
I know how to do this without the pop-up. I just don't know how to incorpirate this with
<a href="http://www.yourweblog.com/yourfile.html" onclick="window.open('http://www.yourweblog.com/yourfile.html','popup','width=500,height=500,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">About</a>
Thanks! After this is answered then my system will be done!
-
Well, I didn't just paste it I took out the a href and stuff out. I don't know what I did, but I was wrong and I got if fixed now! So I guess it dosen't matter. I really appreciate the help.
-
oh, I guess you were right, thanks! I appreciate it . My bad.
-
it's not the same thing. On his he's defining a link and on mine I'm defining a link within a variable. This is what happens when I post what he does:
Parse error: syntax error, unexpected '<' in /home/wiicharg/public_html/hubchat/insert2.php on line 8
-
I did, it still didn't work
-
I still need help with this... it won't work.
<html> <?php $dir = $_POST[dir]; $file = '/home/wiicharg/public_html/hubchat/hubex/shout.php'; $newfile = '/home/wiicharg/public_html/hubchat/***Need variable here***/shout.php'; if (!copy($file, $newfile)) { echo "failed to copy $file...\n"; } ?> </html>
[SOLVED] if folder already exists then display error message?
in PHP Coding Help
Posted
wait, this only tells them that it already exists and dosen't prevent them from overwriting it. Is there any way to do both?