Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Similar to Facebook, I want to do a sharing feature where a user can choose to keep something private or share with 1 or more people. I know how to do a drop down but that limits my ability to be able to do it only for one person. How do i do it so i can allow people to select more than 1 person in a way that its user friendly and not confusing.
I was thinking of using AJAX or if HTML5 had something but i am new to that area so i don't know.
What is the best way to do it?
You could use a <select multiple>, but that's not very user-friendly. I'd use something like this: http://jqueryui.com/demos/autocomplete/#multiple.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I'm currently working on my school project and I started wondering if it's a good approach to pass some variable through href so it can been seen in the URL.
Is it good or a bad way and why?
Or are there any better ways?
If it's not information that should be private I don't see why you couldn't do it. Especially if you need to reference something on a new page, it would make things easier.
It is good practice to use GET parameters for navigation purposes.
For user data input you can better use forms with POST.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Can u tell me, can i use database from this server www.serversfree.com for my own website?
I googled but couldn't find anything ..
Thanks all
Yes, if you are allowing in your database to access from outside. If you are behind firewall, you need to set up portforward. But i do not recommend this.
Instead to directly access your database from outside your server, let's write an API, use API key and security tokens to perform actions on your DB.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Which one of these styles are prefered when retrieving data to display in a view?
Straight forward laravel with no custom methods in the model:
$guest->bookings->first()->id;
$guest->bookings->first()->bed;
$guest->bookings->first()->date;
or a method to get the latest booking model:
$guest->getLatestBooking()->id;
$guest->getLatestBooking()->bed;
$guest->getLatestBooking()->date;
or seperate methods for each value like this:
$guest->getLatestBookingId();
$guest->getLatestBookingBed();
$guest->getLatestBookingDate();
It depends if you need to attach other queries (like 'where', or 'select'). This doesn't mean that you always have to use the second option, third is excellent too. For the first one, try to avoid it.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have a MySQL table "news" where I store "id","title","description". I would like to store pageviews and later use it to rank pages according to popularity.
What is the best way to do it? I've heard a lot of people complain about MySQL freezing due to high traffic. I don't want that to happen.
A simple counter would work, something like: update news set page_views=page_views+1 where id=xxxx
MySQL drives a lot of very large sites....
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
All,
I'm curious what the best approach to this would be. In case the tags weren't noticed, I'm using PHP and Laravel 4.
My application requires that users register with an email address that is from specific domain names. Currently there is only one domain, however, I can see it being a requirement to white list others.
I would assume it would be best to put the domains into an array. Would I run a regex from $rules array against that array? I'm somewhat green to regex. I don't use it often enough to commit anything advanced to memory so feel free to talk to me like a 2 year old.
You can create a custom validator for this. See http://laravel.com/docs/validation#custom-validation-rules for reference.