October 15, 201312 yr Helo am a beginner, please I need to automatically store links in my database depending on the clients request. I have a navigation web app and i need the users to fill a form. The content of the form will be the information to be displayed on the web page whose links are autogenerated and stored in the database just as facebook page of a facebook user works. Thanks
October 15, 201312 yr you can just use an auto increment column so the IDs would be something like index.php?id=15492 this is the easiest but also easier to find other documents, or you can do something like this (in php) <?php $origString = str_shuffle("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); $stringLen = '6'; // Length you want the ID to be $i = 0; $pass = ''; while ($i < $stringLen) { $rand = mt_rand(0, strlen($origString)); $pass .= $origString[$rand]; $i++; } echo 'Password: '.$pass; ?>
October 15, 201312 yr Author Ok Boss. I get your idea but as I said am a beginner and to make it easier for me, I would appreciate greatly if you give me more detals on how to achieve this solution. Thanks. . . Am very grateful.
October 15, 201312 yr well what option would you prefer the numbers or the random characters from there i can help more
Create an account or sign in to comment