-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
having an issue, I'm not getting inserts into the table #5
Comments
I Don't think this works if the row count is less than the string length of ALLOWED_CHARS... kind of weird, don't know how this wasn't an issue when he built it. In the getShortenedURLFromID function if you insert $integer+=100 it works for me. Strange. |
I have the same issue. I tried $integer+=100 at the beginning of the function and I still can't get inserts. |
here's the code I had modified awhile back: function getShortenedURLFromID ($integer, $base = ALLOWED_CHARS) { $integer += 100; $length = strlen($base); $out = ""; while($integer > $length - 1) { $out = $base[fmod($integer, $length)] . $out; $integer = floor( $integer / $length ); print "while loop: " . $out . " - ". $integer . "\n"; } print "getshortened url:" . $out . ' ' . $base; return $base[$integer] . $out; } This was in shorten.php |
I got mine working Ryan, but I am confused. This doesn't seem to be a shortener at all. It only stores an index. What is the point of $base of there isn't even a column in the database for a shortened slug? |
Yeah, I think it's fundamentally flawed. I used it for a brief time and then I believe I just implemented my own method. I can't speak for what the original author intended. |
The database is not getting updated, any suggestions for debug?
I'm running on qrtrk.us for my shortener, I'm getting qrtrk.us/0 for every shortened url and it's not forwarding
no lines have been inserted into the table shortenedurls
I've double checked the user name, the password, the database name
I can phpadmin and manually add lines/records but no redirect happens.
The text was updated successfully, but these errors were encountered: