Jump to content

alejandro52

Members
  • Posts

    87
  • Joined

  • Last visited

    Never

Everything posted by alejandro52

  1. IF i don't fix the error will there be any problems on my web page besides showing the warning?
  2. from what i see there is nothing. I tried everything, putting space and removing it pressing backspace and all.
  3. I keep having the same problem when i run my script on the server. the error is Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/alliapop/public_html/ekloges2010/ekloges2010/eisagogi.php:1) in /home/alliapop/public_html/ekloges2010/ekloges2010/includes/session.php on line 1 I know i have to put session start at he very first line and i did but the problem keeps showing up. What else should i check?
  4. i divide two number but the result is something like 4,5555555. I want to show the two tenths after the , and to round it up so the result to look like 4,56. What is the function to do that? I know it's preaty easy.
  5. what does the # symbol do in php(e.x index.php?cat=1#privacy)? How can i use it? From what i 've seen you use it for changing a whole div without reloading the page like tabs..
  6. Yes, i know how to use session start and i know how to use just sessions without cookies. My main problem is how am i goiing to restore the session when the user comes back to my web page. Should i store the session name in a cookie and also in a table in my database and check if they match? or should i check if the users ip is the same with that on the cookie?What is the best practice when you want to restore a session after the browser is closed and reopoened?
  7. So step by step what i'm going to do: user types in username and password. with the php post method i check if they are correct. If they are i set the user id and username in the session. I also set the users ip inside a cookie. Now when the user closes the browser the session is destroyed. When the user reopens the browser and comes back to the web page i check to see if the user ip is the same as the user that came back. If it is i set once again in the session the usename and user_id. Is that correct? BTW how come php remebers my username even if my ip has changed?
  8. right, the user ip, forgot about that. Whats a token?
  9. Thanks for the reply, you got me kind of covered. But if i use session, when the browses closes so does the session. How am i supposed to restore the session when the user reopens the browser. If i store the session id inside a cookie whould that be ok(is it true that firefox does that automaticaly unlike iexplorer)? And how am i supposed to prevent another user from stealing the session id.
  10. So for example, if i have a web site where user can log in and post stuff like php freaks, if a use session, when the browser closes the session is destroyed. If i use cookie it will remember the user. But wouldn't it be a safety risk?
  11. What is the best practice to use cookies and sessions? Should i create a cookie and keep inside the cookie the name of the username the user has logged in or a session? How am i supposed to compine theese two? Is there any example or a tutorial on this? For example how does php freaks sessions and cookies work.
  12. I have a query that displays some results. What i want is when i click a button to change my query sort order. how do i do that?
  13. Ok, everything fixed. I forgot to close one div tag. So i guess firefox bybass the problem and fixes it but iexplorer won't do that.
  14. I have the following problem. I have some div tags and inside of the some other div tags like this <div> <div id="div1" float:left> (some other div tags) </div> <div id="div2" float:right> (some other div tags) </div> </div> the problem is that in firefox the div2 floats right but in iexplorer goes below the div1 tag. a tested with javascript to find the parent nodes and they had different in iexplorer and different in firefox. does any one know what may cause the problem?
  15. I have two one database with tables users and blogs. The two are connected with user_id. What i want is to create a table with ratigns witch stores the rating of the user to the blog(like the rating of the youtube user to the video). What is the best way do that. Create a table witch stores the user_id, blog_id and have the rating inside?What if the ratings are a lot?
  16. I can't see how this works. First of all i need to return utf8 characters and that doesn't work. How am i going to send back an array from php to javascript
  17. how do i send a json oject in my exapmle?
  18. I want to return an array using ajax to javascript. if(xmlhttpmail.status ==200){ myarray = xmlhttpmail.responseText; for(i=0;i<10;i++){ document.getElementById("mylabel").innerHTML += myarray[1];; } }else{ document.getElementById("mylabel").innerHTML=xmlhttpmail.status; } if(isset($_GET["id"])){$id=$_GET["id"];$sql="SELECT * FROM keimena WHERE keim_id = '".$id."'";$result = mysql_query($sql);$num = mysql_num_rows($result);$row = mysql_fetch_array($result);if($num == 1){ echo $row;}else{ echo false;}} As you can see i awant to return an array but it doesn't return anything.
  19. so the only thing you have to do to cancel the form from going to the next post page is to return false to the onsubmit function?
  20. I want in my form to validate on the fly(when the user enters the user name) to validate if the user name exists or not. How am i supposed to check if the field name is the same or not with a name in the database.Should i use ajax or javascript? is there any simple example on how to do that.
  21. thanks, i'll take a look at it.
  22. I want to create a page where php reads the database and returns the data.in rows. if the data in the database are more than 10 i want the user to click on a button and return the next 10 data in the database. what comand should i pass to go to the next 10 arrays in the row?
×
×
  • 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.