Jump to content

Rommeo

Members
  • Posts

    313
  • Joined

  • Last visited

Everything posted by Rommeo

  1. Hi i have a login form and a logincheck.php file. when i enter directly to logincheck.php the function "isset" gives me true which is wrong. I think the way i m using for isset is true $username = $_POST['form_username']; $username = str_replace("_", "", $username); $username = trim($username); $usernameset = isset($username); echo "username = $username Username exist = $usernameset"; and the output is 1 Is there anything that i need to use additionaly with isset ? Is there any other option ? I will be glad if anyone can help. Thanx in advance. ( as far as i know isset gives true (1) when it's set otherwise zero. )
  2. To setup any web site, you should be able to put the time zone setting into a local php.ini (when php is running as a CGI application) or in a .htaccess file (when php is running as an Apache module) for each site. That "timezone" is for what ? a variable like "$timezone = gmt+2" ?? I will be glad if you can explain it. What / where should i write .htaccess ? php file ?
  3. oh i see the difference now. so that means when i use the "now()" function while saving sth in mysql. It will save the wrong date and time wont it ? PFMaBiSmAd ; i think i cant edit the php.ini file. I m a newbie i just bought a hosting plan with cpanel. and i think when i change the php.ini file, Can i change the date and time setting just for a web site ? or will it effect to all my websites ?
  4. Thank you so much ngreenwood6 I ll use it.
  5. hi i have a hosting that i ll keep many websites. But the problem is date and time is different for these websites. How can i deal with date and time problem by php ? Thanx in advance.
  6. xtopolis thank you soo much ! now i ll check my codes again maybe i can use ur codes. Thank you again for your help again (:
  7. i tried that lot of times.. could not solve it i even put it at the top of my index page.. but cant receive it
  8. hi i coded a simple captcha script but that does not work properly.. my problem is i have an index html. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> . . .// form POST TO securitycheck.php <img src="securitycode.php" alt="security code"> .// form end . and my securitycode.php ; // no doctype info-just code. $md5 = md5(rand(0,999)); // security code $pass = $md5; create_image($pass) $_SESSION['security_code'] = $pass; header("Content-Type: image/jpeg"); // create_image function and my securitycheck.php if ( $postedsecuritycode == $_SESSION['security_code'] ) // this is where the problem is i cant receive the $_SESSION['security_code'] from the file securitycode.php .. that does not work. How can i take that from there ? How do the people solve it ? ll be glad if anyone can help. Working on this part for about a week .. Thanx in advance.
  9. Hi As I am a newbie, there is something that i dont understand. My question is : i have a mysql table which keeps the data of the pages like "about us" & "contact" etc. for to enter contact, i type : "www.mywebsite.com/page.php?id=contact" and i have a page which looks for the data by the while loop named ad "photos.php" for to see photos, i type "www.mywebsite.com/photos.php" And my question is .. What if i write the "while-loop-code" in my mysql table, would it work ? when i enter ; "www.mywebsite.com/page.php?id=photos" As i said my photos.php file is just a mysql query which shows all the photos. I wanna save that code in my mysql.. But i m not sure whether that works. Is it possible ? Is there anyway to do that ? I ll be glad if anyone can help. Thanx in advance.
  10. PFMaBiSmAd thank you so much! Now it works. No problem .. (:
  11. Hi There is a small script which i have to add in every php files. I m using "include" for to do this. But my problem is about the link of the file. my document tree is like this : apage apageWhichpageInfoIncluded.php page pageinfo.php newcode code.php I wanna include code.php to pageinfo.php Let me explain clearly ; <?php include('/newcode/code.php'); ?> This does not work. I wanted it to reach that directory over the main directory ( like links ) But it's trying to find the code.php in /page/newcode/code.php which i dont want, so as a result of this. It does not work. <?php include('../newcode/code.php'); ?> This works, but when i include pageinfo from another page, this does not work anymore. <?php include('http://www.mysite.com/newcode/code.php'); ?> This also works but at this time, there are some problems about the sessions. how can i solve this problem ? I ll be glad if anyone can help. Thanx in advance.
  12. hi i downloaded php-photo script. And want to change some codes in it. But there are many things that i could not understand. 1 ) The language file is like this <? $pa_texts=Array( "ID_NEXT" => "next", . . . ); ?> Is this an array? Why he's using an array here ? Don't we use $array[1]; etc. to call an array ? 2-) Another interesting thing that i have never seen. he is calling these IDs like this line ...<h6><?p("ID_SETUP_MENU_ECARD");?></h6>... As I know I cant start a code like "<?p ". I should use space like "<? p" at least dreamweaver does not accept when I use it like he's using. How can he use it ? 3-) What is "<?p("ID_SETUP_MENU_ECARD");?>" this for ?? I could not find a "function p" though. 4-) As I'm new about php programming, I also could not understand the differerence between $ID="hello", and $ID='hello'; and "ID" => "hello"; I ll be glad if someone can explain at least any of these. Thanx in advance.
  13. Actually the table is simplified.. There are other fields etc. And I need those fields. I just want to know how can i do this ? want to know the way how other people did that. and that size is a result of getimagesize() function.
  14. Blade : But i ll use the photos in different places. Not from top to bottom.. I mean there will be some text ( data ) taken from mysql that is about the information of the place. like " photo (big ) usa is a country that is.. ( data taken from mysql ) photo( big ) for to live there ( data taken from mysql ) photo ( big ) photo(small) photo (small ) photo (small ) I think at that time, I should put quaries in while loop ..
  15. Hi i m trying to build a website for my photo album. As i heard best way to do this is "saving photo info in mysql / uploading photo to a directory" So i did. I upload the photo and save the information of the photo in mysql. but now my problem is how can i display these photos for an order ? my table looks like ; id || place || size || number 1 usa big 1 2 usa big 2 and a photos name is like this : "usa_big_1.jpg" And I wanna display 3 big photos at the top and 3 small photos at the bottom in my page. I thought about making 2 loops like ; " img source = usa_big_$i " etc. but at that time the area for the third photo will be empty if there are 2 photos for any place. So is there any way to make a query for to display a photo that is saved in mysql ( like "display from table where photo size = big && number = 1" ?? or what is the easy way for to do this ? Should I make a query for each order ? I ll be glad if you can help. Thanks in advance.
  16. thebadbad Thank you so much. I was not using that function before. From now on I ll use it. Now everthing is working fine. Thanx
  17. Hi I have a really weird problem about selecting data from mysql. My problem is $name = "blue"; echo "Name :".$name; $sql1 = "SELECT * FROM tablecolors WHERE name ='$name' "; $results = mysql_query($sql1) or die(mysql_error()); $row = mysql_fetch_assoc( $results ); $sectionid = $row['colorid']; echo "Color section id is :".$sectionid; Works fine.. Output is : Name : blue Color section id is : 3 But this one is not working $name = $_POST['name']; echo "Name :".$name; $sql1 = "SELECT * FROM tablecolors WHERE name ='$name' "; $results = mysql_query($sql1) or die(mysql_error()); $row = mysql_fetch_assoc( $results ); $sectionid = $row['colorid']; echo "Color section id is :".$sectionid; Output : Name : blue Color section id is : Color section id is empty.. I could not find the reason why. Both codes are same only the difference is one takes data from post. I ll be glad if anyone can help. Thanks in Advance.
  18. hi For my web-site, i want a page/folder that can only be seen by me. I have 2 questions about this ; 1-) i think this code should work, but dont know why it does not work, what's wrong here ? #if referer from this domain ; RewriteCond %{HTTP_REFERER} ^http://www.mywebsite.com/family/members.html [NC] #enter this page : RewriteRule http://www.mywebsite.com/family/photos.html [NC,F] 2-) I want to hide a direction ( "/myphotos/" ) from site-explorers ? Is it possible to hide by mod_rewrite ? Or is there any other way to hide a direction ? I want noone can know that whether there is a "myphotos" folder. I just wanna see the pictures by calling from a web page, not directly. Thanks in advance.
  19. ok .. lets say my code is = <img src="$name.jpg" align="left"> so is this possible $code = "<img src=\"$name.jpg\" align=\"left\">"; edit($code); echo $code; can i see the code after this ? Actually the code here will be longer.
  20. Blade thank you so much and i got you. But my question is ; is it possible with echo ? i also heard that 's possible with print function. Cause I ll print more codes. So I wanna learn how people are doing it. Again thanks for your replies.I ll be glad if you can tell me by using echo or print function.
  21. Oh yeap. i was trying to use by echo, cause I ll add more variables like size etc. Is possible with that ? with escape chars lets say ?
  22. hi After uploading the picture, for to use it in any page i wanna print the codes. But curious how can i print the codes.I m sure its very easy but I have never done that before. When i try to print it , i see with at the source code can not copy from html page lets say the code i wanna use is <img src="$name.jpg" align="left"> i wanna see it like <img src="pic.jpg" align="left"> Then i wanna copy that from the html.file and use it by echo or print function if it's possible ? Thanks in Advance.
  23. hi As i m a newbie, i m wondering the technique for the pages that makes more than one mysql query. I think it slows down the server when there are many people are entering the web site. So what's the technique for to do this ? Let me explain clearly ; i have an index page. my index page should be like this news ( query from news table )(last 10 news) events ( query from events table ) ( last 5 chosen events ) attraction ( query from attraction table ) ( last 5 chosen events ) latest posts ( query from posts table )( last 10 posts ) This is the only index page's main section. There are also "latest comments" & " new users" queries etc. So should i make more than 4 queries for to do this ? Or is there any other way for to solve this problem ( or for to load the page faster lets say ) Thanks in Advance.
  24. obsidian Thank you for the advice, ll be careful about it.. I found the solution ( dunno if it's the correct solution though ) but it's so weird. Solution is i added the "width : 118 px" to "button ul "and "button li".The weird thing here is; it should be 148 .. The whole buttons width is 148 px. but when i try 148, it does not work. I tried 118 and now it works. Also i solved the problem which i have just noticed (also there are spaces between button images ) by the technique you said - deleting the spaces - around images. That works. Thanks.
×
×
  • 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.