Jump to content

melloorr

Members
  • Posts

    142
  • Joined

  • Last visited

    Never

Everything posted by melloorr

  1. % means 5 % 5 = 0 because you can divide 5 by 5 with 0 left over. 6 % 5 = 1 because you cannot divide 6 by 5 so it will go to 5 divide 5 so there will be 1 left over (6 -5 = 1) Probably not the best way to explain it but that is what it means
  2. Well, I am storing some of images on my server, but I have to type in the name myself which gets a bit boring and I may overwrite an old image by accident, so, I was thinking of having mysql auto increment the image names. But will this be suitable for images, or should it be text.
  3. I know, I was going to use http://www.webhostfreaks.com but it was just too expensive to start off with. So I went with GoDaddy for 2 months and see where things go from there
  4. Thanks for the answers guys, I was narrow minded thinking it could only be used for images and such :-\ I know, I was going to use http://www.webhostfreaks.com but it was just too expensive to start off with. So I went with GoDaddy for 2 moths and see where things go from there
  5. I am asking, what is the use of subdomains. I have a hosting account with GoDaddy, and they give you 25 free subdomains. But they only allow it so if you store something in www.example.com/images/example.jpg then it can ALSO be called from: images.example.com/example.jpg But what is the use of that?
  6. It's okay, I just solved the problem. It turns out it was my stupidity. The form asks for a place to save the image, but I wasn't giving it anywhere to save it to, so it came up with all that. Sorry
  7. This is just 2 lines of the gibberish: ÿØÿàJFIFÿþX5)Yõ^Vüü×éó¿„>]_È‹od÷.ÒìÀ,1g4Ó9T‰OPd`ð‚Hèï|*²²hÖêÕ.‰]¶vHËj­’I1UšeÜFóÃ8æV"¾€³ðZY[Ákå˜Ô¶Û{Kx£¶´i –¹’EIþ`ÊóÒÉ€ÇÖ´_…šÌ« Õ½½ìû£% ²,‘¤Šß1¤7$!¶Y6ìe,6}E,6 O MR„~×*ç’ÒÏ›tß“íæß*ÕjÊîZúí¶ºéò^zcá6µ†EÓÝndEaonÐÁÈåaéó*"¡aó³‘ì¾[ßk6GÄ7Pù’Îtöš\î¸ß,`,@‡òƒeØ,a0VïW@Ô Š(e†ÛK’6ƒlöìØ ¾YYeR¬3,m;Ùà=ׂ ¸:ÆŸ§=ö•¥èÞéëÚÝÑkM§YKö‰ö§s3Ϲu½¬òÚÃ4ÒÄd‰å;ƔҕHF1r”¤¢’Wm¶­¦­Ë»Vî„¢Ò瓲I»½©%{Û§[j÷Ø÷Má~¤Gv:z*Â0ŒËÊç;Šª¨Xœ’ˆ¤ô-×%oëßô‹:QðÑ­üE­A~–icq¢x…­ïch·3ÛOmkQ2ÊÈŠÚ…Í”2î"ª;êýC¾«UZÛÁÅëk;JÏ[§{t¬]š©Oå(éªßWëéCù¢Š+ðÓéŠ( Š( Š( Š( Š( Š( Š( œªX€2Iô?—z|0K;¬q!vržøÏÐW²ø+áÕÍô‘Ou8f]ª²I m@9f9ÀäõèåÙf+2­Xzr•ä“Ÿ,Si;»[C*µ¡F.S’Vé}_ËësŠð÷ƒïµyP´l°¶2JN~¿áÔb¾¥ðÂYîž$´³y9O2o(²¯#©Æ3×;ˆç¯sðGÁ¯² I used $_POST but I am still getting the gibberish. I am using elseif statements too, could that be the problem? if ($resizeimg == "small") { } elseif ($resizeimg == "medium") { } elseif ($resizeimg == "big") { } elseif ($resizeimg == "large") { } else { echo "Error";} And I dont get see the echo "Error" either
  8. Okay, So I have a dropdown box: <select name="imgsize"> <option value="small">480 x 360</option> <option value="medium">720 x 540</option> <option value="big">1200 x 900</option> <option value="large">1440 x 1080</option> </select> and I have code that gets the size: $resizeimg = $_REQUEST["imgsize"]; But I cannot get it to work with an if statement: if ($resizeimg == "large") { } It just comes up with about 50 lines of gibberish. I have used error_reporting(-1); but that is not coming up with any errors. Could anyone help please. Its probably so simple, but my mind is drawing a blank
  9. If it is a personal challange, why are you asking how to do it? But, this may work. At the end of each script, have a form that goes to the next script. Example: <form method="post" action="<?php echo $_SERVER['PHP_SELF']?>"> <input type=submit name="submittochecker" value="Submit"> </form> </html> <?php if(isset($_POST['submittochecker'] { .......... ; } That is VERY rough and may not even work, but it is the best I can think of. Just change the submit name of the the script you want to run next, and change that if(isset($_POST['submittochecker'] to whatever you named the submit button, and it should run that script. Then place another one at the end of that. If you know what I mean.
  10. gomesgomes, why do you only want it in one file anyway? I will work much better and easier if it is in multiple files. Is this a school project or something?
  11. Thats pretty much self explanatory. The table Checks doesn't exist. Have you checked the database and made sure it does exist? Actually, have you connected to the database?
  12. $Result = "SELECT * FROM Checks WHERE UserName='$Username'"; $queryresult = mysql_query($Result) or die(mysql_error()); $Rowexist=mysql_num_rows($queryresult);
  13. $Result = "SELECT * FROM Checks WHERE UserName='$Username'"; $Rowexist = mysql_query($Result);
  14. Nope sorry, I think it will be impossible to have all 5 (or even 4) in one file. file1 and 2 can go together, but that is about it. But I may be wrong, maybe someone more advanced may be able to do it. But I cannot help. Sorry
  15. Having them all in one file will not work. file 5 is the logout script. Which should be in its own file, because if it was all in one file, as soon the session starts, the session will be finished by that script.
  16. else if ($step == 2) <div>LOGIN WELCOME</div> <div> HERE IS YOUR USER DATA:<br /> <label class="data">username:'; <?php echo $_SESSION['username'] ?> <br> password: <?php echo $_SESSION['password'] ?> <br></label> HERE IS YOUR SESSION DATA:<br /> <label class="data"> <?php echo (session_name().": ".session_id()) ?><br> <?php echo ("SESSION DATA: ".session_encode() )?> </label> </div>index.php?step=3">Logoff</a></div> } You have not used { to open the if statement and also you have not closed the php tag before you used the html
  17. Well you said it says it updates, but it doesn't change anything. So maybe your variables are confused. At the top of your code, to have assigned the old data the the same variables you assigned the new data too. Maybe its just that instead of sending the new data, it is sending the old data instead. Its worth changing the variable names just to be sure
  18. But it is displayed in the form, which has to be sent before the variable gets defined
  19. floridaflatlander has a point. is this line 63? $msg = "<font color=red>YOU DID NOT FILL ALL OF THEM IN!</font>"; That will not display it to the screen, it should be: $msg ='<font color=red>YOU DID NOT FILL ALL OF THEM IN!</font>'; echo $msg;
  20. Copy and paste this. If it doesn't work then I have no clue what could be the problem <div id="ahome"> <?php include "scripts/connect.php"; if(isset($_GET[edit])){ $newid = $_GET['edit']; $query = mysql_query("SELECT * FROM news WHERE id='$newid' LIMIT 1"); $rows = mysql_fetch_array($query); $newstitle = stripslashes($rows['title']); $newsby = stripslashes($rows['by']); $newsbody = stripslashes($rows['body']); } if(isset($_POST['updatebtn'])){ $newid = $_POST['saveedit']; $newstitle = $_POST['title']; $newsby = $_POST['by']; $newsbody = $_POST['body']; if ($newstitle != '' && $newsby != '' && $newsbody != ''){ $query = mysql_query("UPDATE news SET title='$newstitle', by='$newsby', body='$newsbody' WHERE id='$newid'"); echo "UPDATE SUCCESFULLY!"; }else $msg = "<font color=red>YOU DID NOT FILL ALL OF THEM IN!</font>"; } ?> <form action='enews.php' method='POST'> <table> <tr> <td></td> <td><?php echo $msg; ?></td> </tr> <tr> <td>Article Title</td> <td><input type='text' name='title' size='45' value='<?php echo $newstitle; ?>'/></td> </tr> <tr> <td>By:</td> <td><input type='text' name='by' size='30' value='<?php echo $newsby; ?>' /></td> </tr> <tr> <td>Article Body</td> <td><textarea cols='45' rows='25' name='body'><?php echo stripslashes($newsbody); ?></textarea></td> </tr> <tr> <td><input type='hidden' name='saveedit' value='$newid'/></td> <td><input type='submit' name='updatebtn' value='Update' /></td> </tr> </table> </form> </div>
  21. So, does it do noting at all, or does it update your database with no values?
  22. Change: if ($_POST['saveedit']){ To: if(isset($_POST['updatebtn']))
  23. Are you getting any errors? Try removing the php tags here } ?> <?php if ($_POST['saveedit']){
×
×
  • 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.