Jump to content

chai

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

chai's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=377776:date=May 28 2006, 04:01 AM:name=witt)--][div class=\'quotetop\']QUOTE(witt @ May 28 2006, 04:01 AM) [snapback]377776[/snapback][/div][div class=\'quotemain\'][!--quotec--] I basically have a random number created that's sent via GET to another page. So basically page.php is sending rand(00,99) to page2.php and a link such as page2.php?rand=53 is given. On page2.php, the number 53 would have a certain meaning. Now what I want is so that if someone types in page2.php?rand=80, they are redirect to page.php instead of showing page2.php with nothing on it. I don't want to use a database by the way. [/quote] If the purpose you want to do this checking is for security, you might want to create a session of user that is logged in your page. Assign a session id to user when they are logged in. And on every page, check whether session id is empty. If so, just redirect them to page.php. If you just want to make sure the databse have records with the eg.rand=53, on page2.php,simply write a sql to check on the db. If it return a value, proceed wit hyour proces, else redirect user to page.php
  2. well, also make sure that you have the statement session_start() at the very top(1st line) of each of your php pages. Even an empty space at the top of the page will result in that error. so, just place: [code]<? session_start()?>[/code] at the 1st line of your page. This certainly solves my problem. Hope it does for you. Maybe you'll want to have a look at the dedicated thread on "troubshooting session" in this forum.
  3. [!--quoteo(post=377011:date=May 25 2006, 08:15 AM:name=pkmleo)--][div class=\'quotetop\']QUOTE(pkmleo @ May 25 2006, 08:15 AM) [snapback]377011[/snapback][/div][div class=\'quotemain\'][!--quotec--] Sorry, I am not getting the result. Its not displaying the session variable. I am not sure. Cookies are enabled in the browser. I am using PHP 4.2.3-win32, Apache 1.3, MySQL 5.0 on Win XP Pro. [/quote] I am facing the exact same problem. I've tried reinstalling apache server, suspecting it is the cause. I have to revert back to a older version of phptriad before getting the session to work. Now it is working for me. Well, at least I am able to pass session variables between pages. Something is still notright though. Maybe you can try installing other version of apache or try with other installer.
  4. It is working now.. I was messing with the .ini file..don't know whether if this the cause :p I am rather stuck in the session object though going through tutorial as i am writing this.. Thanks.
  5. Hi, I am trying to write often-used code snippets such as add, edit,delete function and place them in functions.php So, whenever I need to use them, I can just call then up and pass parameters to them. I am able to call a function that is inside the same page it is called. But, how do I call a function that is in another file. I've read about the include() function, but it doen't perform what I wanted. Any ideas?
  6. [!--quoteo(post=375472:date=May 20 2006, 04:26 AM:name=448191)--][div class=\'quotetop\']QUOTE(448191 @ May 20 2006, 04:26 AM) [snapback]375472[/snapback][/div][div class=\'quotemain\'][!--quotec--] 1) The structure will hardly differ by choice of the scripting language. You may encounter limitations or possibilities compared to asp, but you'll have to adapt as you go. 2) I can recommend to use OOP for PHP, especially if you'll be able to use php5. Procedural scripting can get messy if your creating an app the size of an CRM system.. Since you've already got experience with asp, it won't take long to master. 3) Pffff... Too many. I can recommend you do a couple of CMS tutorials, that'll give you a point to start. Secondly, share your codedrafts on forums, let people tackle the problems you encounter. I probably shouldn't be saying this, but since you don't have much time, I think it's best to use multiple communities... 4) PHP is really flexible, can't think of anything specific. Good luck. [/quote] Thanks for the advice. Off with my new project then :)
  7. Hi all PHP gurus, I am to develop a CRM-like software for a company in PHP. I have no prior experience in PHP. I worked with ASP all the while. I've been going through some PHP tutorial, e-book etc.. My questions are: 1) What are the things that I need to know/sort out before starting to code besides designing on the data model. For eg, is there any particular structure that is recommended for a CRM s/w??(don't know whether this makes sense?) 2) I've read about OOP programming in PHP. Do you guys recommend in coding based on it. As I am really new to PHP and the timeline is quite short, is it better if I just code it "normally"? (writing often-used functions and calling them etc ..etc) 3) Any good PHP web resources that are recommended? 4) Any specified programming structure that I should keep to? I hope to have all the important "structure" well defined/designed to make enhancement easier in the future. Thanks in advance.
×
×
  • 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.