-
Posts
149 -
Joined
-
Last visited
Never
Everything posted by IrOnMaSk
-
thankx guys, so making sure i'm getting it right... both of you're using the 'script_file_name' so if i'm referencing to itself and the the file i'm coding in name form.php.. the 'script_file_name' whould be 'form.php'? <?php echo $_SERVER ['form.php']; ?> and that code is in that form, form.php thanks for the input
-
Alright guys, So using <?php echo $_SERVER ['PHP_SELF']; ?> is not safe because it opens itself to XSS attack... What do you guys use in replace of that? I been using it forever...
-
you're right if you just grab the data and process it without checking the content first striping the query string from the current url or escape it with the esc_url... but other than that i've using it what would you suggest? i wanna use new method
-
yes you can do that one way is to have the register or the login code in one page with the form and do the $_SERVER['PHP_SELF'] (if you don't have it on same page) instead of grabing user info from the html form from another page... And do a simple if condition. if condition not met (in your case no username supply) show the form again. get it? give me full code i can tweak it for ya... hahaha
-
uploading large file like that, your post_max_size has to be bigger that your upload_max_filesize and if you have memory_limit enable it has to be bigger than post_max_size try that....
-
ok, so are you trying to grab the info users fill in the form and insert it to the database? don't wanna dive head in answering what is not being ask :'(
-
actually the code is just exactly what you hav given. just have to translate that to php... assuming you have html and php in same page.... <html> <head> <body> say bla bla bla <?php here you grab the info from the form and echo it here like so $name = $_POST['name']; using that to keep grabbing the info afther you done. echo it likewise echo $name; ?> here you continue html stuff... bla bla bla... <?php here you do same as above... grab and echo ?> </body> </html> so yeah you can echo those info to wherever you want to on same page... format is like what you said just use the $_POST[''] and echo in those places....
-
well I would have a elvis.php page in the subcategory form action... then in the elvis.php i would grab the info from the sub category selected using the $_POST[''] and echo it to the page...
-
that's probly were more answers and bunny trail than what Jma was looking for
-
absolutely right... if you use the two function interchangable you won't even get to do the query at all because it will just throws out error
-
oopsi, i meant: <?PHP $con = mysqli_connect('localhost', 'virtuala_test', 'password', 'dbname') ?>
-
you just giving yourself extra step in your connection. y not just $con = mysql_connect('localhost', 'virtuala_test', 'password', 'dbname'); if(!$con) { die ("An error has occured. Please contact the webmaster with the following error: " . mysql_error()); } that will connect and select the database. for the error, try to log into your database with the user n password you're gave in the connection. Most likely, u gave the wrong password, or the suer 'virtuala_test' is spelled wrong or it has not been granted access to the database you're trying to select to use... oh and try my method of connection, you might have some lucks talking about luck, good luck!!!
-
hmm i think that's probly it, because the file has the .html.., and i usually open to see if it write to it successfull, it always shows that it did write to it. so i'm not sure if i ever close it before i test the read/write... but if opening the file, while testing the write to it causes the problem, then i'm sure it must be it... thanks i'll keep that in mind
-
Err, actually it's working fine now... I've done nothing to it!!! I guess it's windows, just like it sit for a while or restart the computer!!! thanks
-
hi PFM, No it's not in any loop. here's the code $date = date("m/d/y"); $time = date("h:i:s"); $page = ob_get_contents(); ob_end_flush(); $fp = @fopen("content.html", "w"); fwrite($fp, "<strong>" ."<span style = 'color:purple'>" ."Retrieving Date: " .$date ." Time: ".$time ."</strong>" ."<br />" .$page ."</span>"."<br />"); fclose($fp); and i just have this at the top starting where i wanted to start writing to file ob_start();
-
thanx dod, that works... although that do away with the error but just like u said the error is still there. any idea or direction on how to solve error issue?
-
hi guys, so i'm doing the open/read/write... it works fine... but i got an error line 250: $fp = fopen("content.html", "w"); don't know why the error because it open/read/write to file just fine. how do i just comment out the error... because the error gives me all sort of problem... thanks
-
so i can't download your source.zip file. Sounds like the problem is with the mail function. If you just show the mail function code in your message, I problem can help. Another thing is to make sure that you have a mailserver enable either in your php.ini or in the mail function itself.
-
you have to enable mailserver and the port on the your webhosting server. but premiso's right. We can't do that here. Sumbit them the ticket they should be able to do that for you.
-
hey you will encounter problem passing variable like that if that variable holds lots and lots of info inside it. there's limit to how much info you can passing. but if your variable hold little info, should be fine. otherwise, your browser will freak out!!!
-
Tek, i'm guessing that you have like a form page where users enter info then click submit then your php would insert the data into the database. Post that form page code too. Most likely looks like the data never got passed through your $_POST... and your VALUEs in the INSERT statement are not corrected (ah looks like it have to see your variables in the form)... And why you using both the $_GET and the $_POST superglobal variables? waiting for all your code
-
try this http://php.net/manual/en/function.shell-exec.php or this http://www.php.net/manual/en/function.exec.php why you need to call it from php? use autosys or task scheduler or something if you can't figure that out...
-
Dynamic drop down field works but when chosen, nothing happens.
IrOnMaSk replied to snoreboy01's topic in PHP Coding Help
oh srry here's the syntax for displaying your code "[code] code goes here " or " code goes here " [/code] -
Dynamic drop down field works but when chosen, nothing happens.
IrOnMaSk replied to snoreboy01's topic in PHP Coding Help
hey snoreboy, first thing first, when admins come by, they'll tell you to put all your code between either code here or code here eaiser to read... and maybe put your code in each page in separate ... or ... so people know how many pages you're talking about... come by later,,,,, -
hi Patrick, that error is critical. If you just want to output just ERROR, sometimes it's not sufficient to debug the error. And that error will always appear. And don't know if you know what that error means, it just that your odbc connection namely the DSNname is no longer exist because you don't have connection (that's obvious like you said). but here's the answer to your problem if you only want to display the text ERROR, do this, $conn = @odbc_connect('DSNname','user','password') or die("Error"); the @will tell php to forget about its own built error message, and use whatever you gave it... i think It'll work try it