Jump to content

htetnainglynn

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

htetnainglynn's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Umm That's why I said I am sorry if this has nothing to do with php. I'm posting here because it's from a tutorial which discusses about web services + php, so, I was kinda hoping someone here might have followed that tutorial and might be able to answer my question. Anyway, after I been doing googling all morning, I have an impression to think that, that tag is not really important and can be ignored. I dunno but if someone would like to correct me on this one, please feel free to.
  2. Hi everyone, I am really sorry if this doesn't have to do anything with php but I am totally helpless. I tried Google but it doesn't give me an obvious answer. I am studying web services currently with php. I followed a tutorial and I just dun seem to get what this mean is. Greatly appreciated if someone could tell me how this line works. <soap:operation soapAction='urn:localhost-catalog#getCatalogEntry'/> The part that I dun get is soapAction='urn:localhost-catalog#getCatalogEntry'. How do we get its value ? What is "urn" stands for ? How 'localhost-catalog' works ? what that # sign doing there ? I guess getCatalogEntry is some method in php file. :confused. Please help me out. Thanks all
  3. Thanks. exit() method does the trick.
  4. Thanks. Then I am on the right track I guess. My implementation is something like that too but there is a serious problem (it seems serious to me) is that when a user request an absolute URL let's say /myserver/mysystem/admin/importantpage.php. If the user hasn't logged in, they can't view the page but the problem is they can see some flush (like 1 sec, it loads and redirect the user back to the other page if they haven't logged in) of the page. In my script I check against with proper conditions and redirect if necessary. How can I prevent that small loading of the importantpage.php and just redirect the user completely to some other page ? Thanks for yr reply. U d man
  5. Thanks for pointing that out. Would you recommend any framework or umm anything that would achieve something like that ? I have a working site. All I wanna do is filter out those who don't belong in several pages and allow access only to admin. I wrote it without using any framework (like Zend) and I don't really want to do it from scratch again. Please, any suggestion would be appreciated.
  6. Hi everyone, On my site, I am planning to have various user access such as "super_admin", "normal_admin" blur blur blur. Pages can be only viewed by user who has access to view those pages except for ofcuz super_admin who can do almost everything. I am wondering how can I do something like that in a different way than the solution i'm currently using ? My current solution is each page carry their own weigh (some number) and on page load check against with logged in user role stored in Session variable. Based on the user role, i determine whether let the user access the page or redirect to some page. Is there any better way to do the same process in a better way ? Please will be looking forward to hearing any input. Thanks all.
  7. I've found A solution for MY problem. I dunno what's wrong with my code so I get rid of function (that makes this pagination thing) and run the script from top to bottom without any function calls, and it works. I guess i was having some kinda problem with variable scope. If there is any common problems noob like me would encounter doing pagination, please share your experience here. I would love to hear from anyone who experienced problems doing pagination and come up with a solution. Meanwhile, allow me to leave this thread as "unsolved" and i'll mark it "solved" afterward. Looking forward to hearing more on this topic from exp programmers. cheers
  8. Hi everyone, This time i'm really stucked. Please help me out. I have been doing Pagination for when user type in some keyword let's say "j" then I will list all username which includes "j". The following is my sql statement. It displays properly on the first page but not on the 2nd and the rest. SELECT * FROM users WHERE username LIKE '%$username%' if($pageno==1) { echo "<br />FIRST PREV"; } else { echo "<br /><a href='{$_SERVER['PHP_SELF']}?pageno=1'>FIRST</a>"; $prevpage = $pageno - 1; echo "<a href='{$_SERVER['PHP_SELF']}?pageno=$prevpage&searchThisUser=j'>PREV</a>"; echo "(Page $pageno of $lastpage)"; } if($pageno == $lastpage) { echo "<br /> NEXT LAST"; } else { $nextpage = $pageno + 1; echo "<a href='{$_SERVER['PHP_SELF']}?pageno=$nextpage&searchThisUser=j'>NEXT</a>"; echo "<a href='{$_SERVER['PHP_SELF']}?pageno=$lastpage&searchThisUser=j'>LAST</a>"; } } I copied above code on some tutorial and using straight in my source without any modification. I don't know why only page 1 can display correct result but not the rest. I thought it's something to do with GET method and I purposely handcode "searchThisUser=j" for testing purpose believing other pages would get the value "j". Any help would be appreciated. Output There are 6 users with their username includes "j" and I limit to 5 users per page. It displays properly 2 pages at the bottom and when I click next, it's not actually displaying the last one instead the first 5 users.
  9. Thanks. It's indeed what i'm looking for. I have found several and I find this tutorial quite useful. Hope anyone come across the same problem, can solve it out. http://www.tonymarston.net/php-mysql/pagination.html Cheers !
  10. Hi everyone, I am sure the answer is out there but I just can't figure out the right keyword to search. I hope somebody would shed some light on this. I have like thousands of records in my mysql database and it's pretty much a routine, I wanna retrieve those records and display it using a table on a page using PHP. Obviously, displaying all those thousands of records on the page would probably overwhelm the user. So, I am thinking of break down the entire result into like 100 records per page. So, if I have 1000 returned result from mysql, I might have 10 pages each showing 100 records and a small hyperlink underneath of the table which allows user to hop on to more pages. I have no idea how to make something like that. Would be really appreciate anybody could point me to some sorta tutorial or code snippet. Thanks all.
  11. ahh how to do that ? Sorry if it sounds stupid, but i just can't find any button or similar to do that kinda thing. help me
  12. Umm I found the answer. It does return as an array and we need to declare the name of the checkbox something like name="checkboxNames[]" and retrieve it back from the php file as array For eg. for($i = 0 ; $i < count($_POST(["checkboxNames"]) ; $i++) { //do whatever we wanna do } Hope it helps others who have the same problem like me.
  13. Hi everyone, First time here and learning PHP now. I have a page which includes of several checkboxes based on a table rows. Eg, if my users table has 30 users, there're going to be 30 checkboxes. I am sure you probably hav guessed by now that if the user selected all 30 users, and delete, they all will be deleted in the database. I am having difficulties in how to uniquely identify each checkbox and get the value from each checkbox because I am thinking of storing user_id from the database in each checkbox as value. Any help would be appreciated on this. To my understanding, if one checkbox is selected and i get the value "on" or if there's value in that checkbox i get the value of it in php file but there should be some sort of like arrays to actually loop through the $_POST["inputCheckboxName"] and get selected checkbox's value or something like that ? Any help would be greatly appreciated. Thanks all.
×
×
  • 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.