Jump to content

Ninjakreborn

Members
  • Posts

    3,922
  • Joined

  • Last visited

Everything posted by Ninjakreborn

  1. What I don't understand is how to write to the file.  Like if a video file get's uploaded, how do I automatically have php create a page for it, and have the stuff in the page I need for it to work, and have a filename, I don't know how to do this, but then if it ends up being just a txt file, have it create a .php filet hat just shows the file information, just created pages with php, one page for each file type, so I can also generate a link, and have it save the new page in a directory with all the proper information:S:S
  2. Thanks for all the help so far as well it's greatly appreciated.
  3. I am confused what do you mean should I just rebuild this entire thing from scratch and learn how, I don't understand you said put it in a seperate page, and include it in my current page, or just run the form to it or what?
  4. I tried exactly what you said and got a blank white screen.
  5. I don't understand.  I could do this, but the script is supposed to check and see whether a username exists in the password, I am very confused:S:S
  6. I mean how do I work that into my current script, see here I see what to do, and what you showed me, but I have the alter script in the other one or something where does that fit in?
  7. Yes I tried your code exactly like above, also I do have the right username and password.  I am beginning to think this dude that wrote teh script is a dumb fuck and i may rewrite the whole thing, or something I don't understand what is going on. I don't know why it's not working.  I need a few things to happen, I don't understand, when I register it logs in a username and password, and even with the admin it doesn't work, I don't know about the session thing, where do I find that at, I showed you all teh code i Had for all the related pages, where do I register those sessions at.
  8. [quote]Right after Submit is AcceptedSELECT administrators.id_administrator,administrators.superuser FROM administrators WHERE username = '' and password = '' Resource id #4[/quote] I don't understand why this is happening, is this normal.  I knew debugging was hard, but I am confused, This is what I got when I changed the code, this is what outputted?
  9. [quote]Right after Submit is AcceptedSELECT * FROM administrators WHERE username = '' and password = ''Resource id #4 [/quote] That is the message I got from that one?
  10. [quote]Right after Submit is AcceptedSELECT administrators.id_administrator,administrators.superuser FROM administrators WHERE username = '' and password = ''Resource id #4[/quote] That is the error I ran into that time, never encountered that before, what does it mean??
  11. Same issue, it's still doing the exact same thing, any more ideas, I copied and pasted that over the old, and it's doing the same thing it was before.
  12. I did EXACTLY as you showed, copied and pasted what you had over the old, I don't understand, but it's still doing the same problem, here is my table information it seems to match. Db name doesn't matter I tested that connection, it's already connected to the database database name = ip table name = administrators and here are the fields in that table [quote]  Field  Type Collation Attributes Null Default Extra Action   id_administrator  int(10)    No    auto_increment                username  varchar(50) latin1_swedish_ci  Yes  NULL                  password  varchar(50) latin1_swedish_ci  Yes  NULL                  adminfirstname  varchar(100) latin1_swedish_ci  Yes  NULL                  adminlastname  varchar(100) latin1_swedish_ci  Yes  NULL                  email  varchar(200) latin1_swedish_ci  Yes  NULL                  LastLoginAdmin  date    Yes  NULL                  regdate  date    Yes  NULL                  superuser  tinyint(1)    UNSIGNED Yes  0                Check All  /  Uncheck All    With selected:          [/quote] I REALLY don't understand why this is happening, and now the new code, I changed it exactly to how you had it, and it's still not working, any more advice, Ihave been fighting this for almost a week now, now you see where I am coming from, I am confused.
  13. Ok I didn't catch that before, Mostly because it's not my script I was just trying to fix it, I changed a few things around this is what I currently have.  And unfortunately I am still getting the exact same issue. [code]<?php session_start(); require_once("incs/conn.inc.php"); if(isset($_POST['submit'])) { echo "Right after Submit is Accepted";   $select = "SELECT id_administrator,superuser FROM administrators WHERE username = '".$_POST['username']."' and password = '".$_POST['password']."'"; $rez = mysql_query($select) or die("There was a problem with the query: $sql<br>" . mysql_error()); if(mysql_num_rows($rez) > 0){ echo "Right after checking if for numrows";   $row = mysql_fetch_row($rez) or die("The mysql fetch row is not working");   session_register("administrator_portal"); $_SESSION['administrator_portal'] = $row[0]; $_SESSION['superuser'] = $row[1]; $update="update `administrators` set `LastLoginAdmin`=Now() where id_administrator=".$_SESSION['administrator_portal']; $result=mysql_query($update,$conn); header("Location: download2.php"); exit; }else{   $msg = "The username or password are wrong."; } }   if($_GET['erroare'] == "nr"){     $msg = "Ne pare rau insa sesiunea dumneavostra a expirat.<br> You must log on.";   } ?>[/code] I changed the parts where they were like that, but the exact same thing is still happening
  14. [code] if(isset($_POST['submit'])) { echo "Right after Submit is Accepted"; $username = $_POST['username']; $password = $_POST['password'];   $sql = "SELECT id_administrator,superuser FROM administrators WHERE username = {$username} and password = {$password}";   echo = "After sql is set"; $rez = mysql_query($sql); echo = "After mysql Query";[/code] I did that and now there is a problem. It doesn't do anything, the entire login page is completely white now, when I try to even get to the page?
  15. I just checked it's not that, it is directly related to that query for some reason?
  16. I am connected.  It is in an included file, as I said up there, it is also listed out up there, the connection is good, but it's messing up the query, I will even right now attempt to move the connection information over to the other page, and see how it goes.
  17. [quote]What is displayed when you change <?php     $rez = mysql_query($sql); ?> to <?php     $rez = mysql_query($sql) or die("There was a problem with the query: $sql<br>" . mysql_error()); ?> Ken[/quote] Nothing it does absolutely nothing, I copied and pasted what you said, it still has my echo statement from earlier showing that the submit was accepted but nothing below that.  Nothing changed. [quote]Sorry to complain but the amount of images on that page is way to much. also can not see where your calling the function($name); or return(); also where the connection for the last page[/quote] I didn't make this website, the entire layout, design, images, content everything is someone elses, they bailed on the guy I am working for, he just needed a few more things done, so I made a few things worked, finished up the scripts for a few forms, sorted through and got register to work and ran into this, so I had no choice over images. As far as function calls to name or return, I didn't see that anywhere what do you mean. And What do you mean about connection for the last page. If anyone can help I would be greatly appreciative I am starting to get desperate on this.
  18. I will keep this in mind, thanks.
  19. I found one thing using echo statements, it is properly picking up the submit, and it is stopping at this line for some reason, but I went over it 4-5 times it all looks correct. [code] $sql = "SELECT id_administrator,superuser FROM administrators WHERE username = '".$_POST['username']."' and password = '".$_POST['password']."'"; $rez = mysql_query($sql);[/code] It is even getting the sql variable initialized, the problem is when it trys to run $rez = mysql_query($sql); That is when the script stops running any advice, there are 2 columns named that, and a table named that, and the other stuff looks right what is going on.
  20. Thanks before I ask any more questions related to this, I am going to step back and look over all this advice, and the tutorial and see if I have enough tools and knowledge now to get this done, thanks a lot for the help, I have a deeper understanding of what I am doing now, before I start digging into it too deep, thanks again.
  21. I did use sessions_start on all of them, this is what is happening and it is really confusing me, this is the related page. [url=http://www.asicip.com/download.php]http://www.asicip.com/download.php[/url] That is the page you go to, here you click on a link.  It takes you to the login page here. http://www.asicip.com/login.php THis is where you login at, you can register, the register form is on that link if you click register, it works, adn it puts the information in the database properly I already tested it out, now when you try and click login, it doesn't do anything, it doesn't even work, it acts like it's not even working, I really really don't understand.  You are suppose to be able to login, to get access to those files, I really really do not understand this, and any advice would be greatly appreciated, here is an example, here is the code for the downloads page, with all the links. Below that, is again the code for the page I am talking about, the login page, and I will also put the include page below there.  You will see what I mean by it not working.  I will also explains how it works, there is a page called download.php, all the links there are suppose to take you to the login.php page, it works perfectly.  Then on the logins page, if you don't have a username and password you register, it works, it records your data, here is where the first issue occurs, it sends an email with just your email address, and nothing else, that is the first problem.  Then when you are suppose to login, if you get the correct info it changed you over to the download2.php page there you can access all the files, because the links are changed to allow you access to the files,  BUt it's not working when I click on the page login, and I try to login nothing happens. Here is all the text The first download page, where you are denied access, it just changes you over the the login page Download 1 Actually the code isn't even important, all it is, is a static page, with a bunch of links taking you to the login page, the login page, is here login page [code]<?php session_start(); require_once("incs/conn.inc.php"); if(isset($_POST['submit'])) {   $sql = "select id_administrator,superuser from administrators where username = '".$_POST['username']."' and password = '".$_POST['password']."'"; $rez = mysql_query($sql) or die (mysql_error()); if(mysql_num_rows($rez) > 0){   $row = mysql_fetch_row($rez) or die("The mysql fetch row is not working");   session_register("administrator_portal") or die("Session register issues"); $_SESSION['administrator_portal'] = $row[0]; $_SESSION['superuser'] = $row[1]; $sql="update `administrators` set `LastLoginAdmin`=Now() where id_administrator=".$_SESSION['administrator_portal']; $result=mysql_query($sql,$conn); header("Location: download2.php"); exit; }else{   $msg = "The username or password are wrong."; } }   if($_GET['erroare'] == "nr"){     $msg = "Ne pare rau insa sesiunea dumneavostra a expirat.<br> You must log on.";   } ?> <html> <head> <LINK href="style.css" rel=stylesheet type=text/css> <title>ASIC IP</title> </head> <body bgcolor="#9aa8c7" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"> <script type="text/javascript"> if (parseInt(navigator.appVersion.substring(0,1))>=3) { // 3.0 or greater. ch1_on  = new Image();  ch1_off  = new Image(); ch2_on  = new Image();  ch2_off  = new Image(); ch3_on  = new Image();  ch3_off  = new Image(); ch4_on  = new Image();  ch4_off  = new Image(); ch5_on  = new Image();  ch5_off  = new Image(); ch6_on  = new Image();  ch6_off  = new Image(); ch7_on  = new Image();  ch7_off  = new Image(); ch8_on  = new Image();  ch8_off  = new Image(); ch1_on.src  = 'images/b_homeap.gif'; ch1_off.src  = 'images/b_home.gif'; ch2_on.src  = 'images/b_aboutap.gif'; ch2_off.src  = 'images/b_about.gif'; ch3_on.src  = 'images/b_infoap.gif'; ch3_off.src  = 'images/b_info.gif'; ch4_on.src  = 'images/b_downloadap.gif'; ch4_off.src  = 'images/b_download.gif'; ch5_on.src  = 'images/b_careerap.gif'; ch5_off.src  = 'images/b_career.gif'; ch6_on.src  = 'images/b_teamap.gif'; ch6_off.src  = 'images/b_team.gif'; ch7_on.src  = 'images/b_pressap.gif'; ch7_off.src  = 'images/b_press.gif'; ch8_on.src  = 'images/b_contactap.gif'; ch8_off.src  = 'images/b_contact.gif'; } function activate(image) {   if (parseInt(navigator.appVersion.substring(0,1))>=3) { // 3.0 or greater.       imagesrc = eval(image + '_on.src');       document[image].src = imagesrc;   } } function deactivate(image) {   if (parseInt(navigator.appVersion.substring(0,1))>=3) { // 3.0 or greater.       imagesrc = eval(image + "_off.src");       document[image].src = imagesrc;   } } </script> <center> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="right" valign="top">&nbsp;</td> <td align="center"> <table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000" width="700"> <tr> <td bgcolor="#9aa8c7"> <? include("incs/top_menu.inc.php");  ?> <table border="0" cellpadding="0" cellspacing="0" width="700" bgcolor="#FFFFFF"> <tr><td> <table border="0" cellpadding="0" cellspacing="0" width="700"> <tr> <td width="6">&nbsp;</td> <td width="164" valign="top" bgcolor="#f1f1f1"> <table  border="0" cellpadding="0" cellspacing="0"> <tr><td width="6"></td><td height="24"> <font class="titlu2">Downloads : :</font> </td></tr> </table> <img src="images/p.gif" width="164" height="1" border="0"><br> <table  border="0" cellpadding="0" cellspacing="0"> <tr><td width="10" height="20"></td><td> <a href="download.php" class="n">Downloads</a> </td></tr> </table> <img src="images/p.gif" width="164" height="1" border="0"><br> <table  border="0" cellpadding="0" cellspacing="0"> <tr><td width="10" height="20"></td><td> <a href="login.php" class="n">Login</a> </td></tr> </table> <img src="images/p.gif" width="164" height="1" border="0"><br> <table  border="0" cellpadding="0" cellspacing="0"> <tr><td width="10" height="20"></td><td> <a href="register.php" class="n">Register</a> </td></tr> </table> <img src="images/p.gif" width="164" height="1" border="0"><br> <br> </td> <td width="10">&nbsp;</td> <td width="510" valign="top"> <img src="images/linie.gif"><br> <br> &nbsp;&nbsp;<font class="titlu">Login</font> <br><br> <img src="images/linie.gif"><br> <br> <form name="form1" method="post" action="login.php"> <table border="0" cellspacing="0" cellpadding="0" width="200" height="96"> <tr><td> <table width="200" border="0" cellspacing="0" cellpadding="0"> <tr><td height="34" colspan="3">&nbsp;</td></tr> <tr><td width="140"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="16">&nbsp;</td> <td valign="top"><input type="text" name="username" style="width: 150;"></td> <td width="14">&nbsp;</td> </tr> <tr> <td width="16" height="14">&nbsp;</td> <td valign="top"><input type="password" name="password" style="width: 150;"></td> <td width="14">&nbsp;</td> </tr> </table> </td> <td><input type="submit" name="submit" value="Login" class="button"></td></tr> </table> </td></tr> </table> </form> <br> <a href="register.php">Click here to register</a> <table  border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"> </tr> </table> <br><br> <img src="images/linie.gif"><br> <table border="0" cellpadding="0" cellspacing="0"> <tr><td><img src="images/sigla_jos.gif"><br></td> <td class="stitlu">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Trademarks/Copyright ©2006 ASIC IP. All Rights Reserved.</td></tr> </table> <img src="images/linie.gif"><br> <br> </td> <td width="10">&nbsp;</td> </tr> </table> </td></tr> </table> </td> </tr> </table> </td> <td align="left" valign="top">&nbsp;</td> </td> </tr> </table> </center> </body> </html>[/code] Here is the included file, this only does the connection, it just connects to the database that is it. [code]<?php $conn = mysql_connect ("mysql", "####", "####"); $select = mysql_select_db("ip"); ?>[/code] mysql is required instead of local host, it's something to do with the way yahoo sets up there stuff. Here is the new download page you should get access too. [code]<?php session_start(); include("incs/auth.inc.php"); ?> <html> <head> <LINK href="style.css" rel=stylesheet type=text/css> <title>ASIC IP</title> </head> <body bgcolor="#9aa8c7" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"> <script type="text/javascript"> <!-- if (parseInt(navigator.appVersion.substring(0,1))>=3) { // 3.0 or greater. ch1_on  = new Image();  ch1_off  = new Image(); ch2_on  = new Image();  ch2_off  = new Image(); ch3_on  = new Image();  ch3_off  = new Image(); ch4_on  = new Image();  ch4_off  = new Image(); ch5_on  = new Image();  ch5_off  = new Image(); ch6_on  = new Image();  ch6_off  = new Image(); ch7_on  = new Image();  ch7_off  = new Image(); ch8_on  = new Image();  ch8_off  = new Image(); ch1_on.src  = 'images/b_homeap.gif'; ch1_off.src  = 'images/b_home.gif'; ch2_on.src  = 'images/b_aboutap.gif'; ch2_off.src  = 'images/b_about.gif'; ch3_on.src  = 'images/b_infoap.gif'; ch3_off.src  = 'images/b_info.gif'; ch4_on.src  = 'images/b_downloadap.gif'; ch4_off.src  = 'images/b_download.gif'; ch5_on.src  = 'images/b_careerap.gif'; ch5_off.src  = 'images/b_career.gif'; ch6_on.src  = 'images/b_teamap.gif'; ch6_off.src  = 'images/b_team.gif'; ch7_on.src  = 'images/b_pressap.gif'; ch7_off.src  = 'images/b_press.gif'; ch8_on.src  = 'images/b_contactap.gif'; ch8_off.src  = 'images/b_contact.gif'; } function activate(image) {   if (parseInt(navigator.appVersion.substring(0,1))>=3) { // 3.0 or greater.       imagesrc = eval(image + '_on.src');       document[image].src = imagesrc;   } } function deactivate(image) {   if (parseInt(navigator.appVersion.substring(0,1))>=3) { // 3.0 or greater.       imagesrc = eval(image + "_off.src");       document[image].src = imagesrc;   } } --> </script> <center> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="right" valign="top">&nbsp;</td> <td align="center"> <table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000" width="700"> <tr> <td bgcolor="#9aa8c7"> <? include("incs/top_menu.inc.php");  ?> <table border="0" cellpadding="0" cellspacing="0" width="700" bgcolor="#FFFFFF"> <tr><td> <table border="0" cellpadding="0" cellspacing="0" width="700"> <tr> <td width="6">&nbsp;</td> <td width="164" valign="top" bgcolor="#f1f1f1"> <table  border="0" cellpadding="0" cellspacing="0"> <tr><td width="6"></td><td height="24"> <font class="titlu2">Downloads : :</font> </td></tr> </table> <img src="images/p.gif" width="164" height="1" border="0"><br> <table  border="0" cellpadding="0" cellspacing="0"> <tr><td width="10" height="20"></td><td> <a href="download2.php" class="n">Downloads</a> </td></tr> </table> <img src="images/p.gif" width="164" height="1" border="0"><br> <br> </td> <td width="10">&nbsp;</td> <td width="510" valign="top"> <img src="images/linie.gif"><br> <br> &nbsp;&nbsp;<font class="titlu">Downloads</font> <br><br> <img src="images/linie.gif"><br> <br> <table  border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top">     <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP 100mA Boost.pdf" class="n" target="_blank">ASIC IP 100mA Boost</a> <br><br> <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP Adair 100b.pdf" class="n" target="_blank">ASIC IP Adair 100b</a> <br><br> <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP Adair 802.11 and network tester (UBT).pdf" class="n" target="_blank">ASIC IP Adair 802.11 and network tester (UBT)</a> <br> <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP Adair 900 and 2.4G.pdf" class="n" target="_blank">ASIC IP Adair 900 and 2.4G</a> <br><br> <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP Antenna Modules.pdf" class="n" target="_blank">ASIC IP Antenna Modules</a> <br><br> <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP Bandgap Ref.pdf" class="n" target="_blank">ASIC IP Bandgap Ref</a> <br><br> <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP Boost PS0100.pdf" class="n" target="_blank">ASIC IP Boost PS0100</a> <br><br> <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP Controller board.pdf" class="n" target="_blank">ASIC IP Controller board</a> <br><br> <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP LDO 150mA.pdf" class="n" target="_blank">ASIC IP LDO 150mA</a> <br><br> <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP LDO 300mA.pdf" class="n" target="_blank">ASIC IP LDO 300mA</a> <br><br> <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP LDO 50mA.pdf" class="n" target="_blank">ASIC IP LDO 50mA</a> <br><br> <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP R2400 Radio Module.pdf" class="n" target="_blank">ASIC IP R2400 Radio Module</a> <br><br> <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP RF Modules.pdf" class="n" target="_blank">ASIC IP RF Modules</a> <br><br> <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/IP Intranet Supplier Station.pdf" class="n" target="_blank">IP Intranet Supplier Station</a> <br><br> <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/IP Provider Station.pdf" class="n" target="_blank">IP Provider Station</a> <br><br> <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/IP Reuse Station.pdf" class="n" target="_blank">IP Reuse Station</a> <br><br> <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/IP SoC Collaborative Platform.pdf" class="n" target="_blank">IP SoC Collaborative Platform</a> <br><br> </tr> </table> <br><br> <img src="images/linie.gif"><br> <table border="0" cellpadding="0" cellspacing="0"> <tr><td><img src="images/sigla_jos.gif"><br></td> <td class="stitlu">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Trademarks/Copyright ©2006 ASIC IP. All Rights Reserved.</td></tr> </table> <img src="images/linie.gif"><br> <br> </td> <td width="10">&nbsp;</td> </tr> </table> </td></tr> </table> </td> </tr> </table> </td> <td align="left" valign="top">&nbsp;</td> </td> </tr> </table> </center> </body> </html>[/code] See I did not do this website, someone else did the whole thing, I came in and fixed some things because he didn't finish it, I think it's shit it's done in tables, the programming is sometimes pointless.  I can't redo the whole site, because I am fixing a few issues for just a few hundred.  I was wondering what to do about this, I have been trying, I have done everything I can think of, mysql_error calls, die, and everything else, I have been debugging for 3 days, and I feel it's probably something simple, can anyone help me out with that.  Thanks
  22. I will try this real quick and see if I can figure anything out, maybe I left a session_start out somewhere, let me try that maybe it will help.  Thanks
  23. That helped a lot, now the one thing I don't understand is how to make the embedded page, have a relation to the uploaded specific file.  Seeing that each file will be in the directory, and each one will have a different name, what prevents from the txt file I have over here called funnypoem, from accidentally attempting to embed itself in a windows media player page.  I don't understand how to make the embedded pages to be exactly related to the uploaded files.  Because on each individual page, I need the file imbedded, and to create a link on each file, so that people can click the link and have it download the file incase they don't have the proper plugin. I know this is a lot, but when I get only 1 txt file, all I need to do with txt files is have them display, how is it going to know not to try and have a download link too, this is the best way to explain what I Don't understand, I am confused, and have tried to explain it before, but maybe that helped.
  24. I will look into mod rewrite what I don't understand about embedding, is how to get a video or music file to be played automatically, and have a download link, this is over my head, I will check into that mod_rewrite first.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.