-
Posts
49 -
Joined
-
Last visited
Everything posted by zazu
-
Hi guys, I have a huge problem with inserting multiple checked checkboxes into database and thene display checkones on frontend. In other word i have 2 problems regarding these checkboxes. 1. I have 3 checkboxes into user profile panel lets say checkbox 1, checkbox 2, etc. The user select the first 2 ones and inserts them into database. When he returns to his profile to edit his details, i want to display to the user those 2 checkbox that he selected earlier. 2. The secound problem i have is that i have a weekly calendar with week days and some hour intervals. For this the user must select the hours for a day when he is available and on his frontend profile to display them. This is another thing that i can't manage to do, and want a ideea. A print scrit of this calendar is attached to this message.
- 11 replies
-
- html checkbox
- checkbox
-
(and 1 more)
Tagged with:
-
Hi guys, I have 2 categories in my website one is CONTRY and the other one is TOWN. Now the non-friendly URL looks something like this: 1. mywebsite.com/country.php?url=clients-in-england (for country category) 2. mywebsite.com/town.php?url=clients-in-london (for town category) Now i want those nonfriendly url's to be something like this: 1. mywebsite.com/country/clients-in-england 2. mywebsite.com/town/clients-in-london How can i exactly do this using .htaccess I've tried something but not working. # redirect "/section.php?id=xxx" to "/section/xxx" RewriteCond %{REQUEST_URI} \s/town\.php\?url=([a-zA-Z0-9_-]+)\s [NC] RewriteRule ^ /town/%1? [R=301,L] # internally rewrite "/section/xxx" to "/section.php?id=xxx" RewriteRule ^oras/([a-zA-Z0-9_-]+)$ /town.php?url=$1 [L]
- 1 reply
-
- friendly url
- htaccess
-
(and 1 more)
Tagged with:
-
Now worked perfectly! It was my bad! Thank you very much.
- 12 replies
-
- calculate age
- data field
-
(and 1 more)
Tagged with:
-
Verify if the photo exists in database else show a default photo
zazu replied to zazu's topic in PHP Coding Help
<?php if ($result = $mysqli->query("SELECT profile_image FROM bonacuora_clients WHERE id='$id'")) { while($row = mysqli_fetch_array($result)) { echo "<img src='photos/" . $row['profile_image'] . "' class='media-object img-circle' width='180' height='180'>"; } } else { echo "default photo is?"; } ?> I;ve trying something like this, but it doesn't seems to work.- 3 replies
-
- database photo
- photo in database
-
(and 2 more)
Tagged with:
-
Hi guys, I've inserted in my database and folder a specific photo for profile. Now i want to verify if the photo is added in database and if it is display it, and if is not display a default photo. The code that i've used to show the photo is below, now i can't manage to do the secound part, wich is to display a default photo if there is none in database. <?php if ($result = $mysqli->query("SELECT profile_image FROM bonacuora_clients WHERE id='$id'")) { while($row = mysqli_fetch_array($result)) { echo "<img src='photos/" . $row['profile_image'] . "' class='media-object img-circle' width='180' height='180'>"; } } ?> Any suggestion?
- 3 replies
-
- database photo
- photo in database
-
(and 2 more)
Tagged with:
-
Hei Barad, thank you for your reply. The code that you provide in returns me 0 value insted of the age of the user.
- 12 replies
-
- calculate age
- data field
-
(and 1 more)
Tagged with:
-
And how the final code should look like?
- 12 replies
-
- calculate age
- data field
-
(and 1 more)
Tagged with:
-
Understand, but i want to get the birthday values from database not to specifiy them manually.
- 12 replies
-
- calculate age
- data field
-
(and 1 more)
Tagged with:
-
I use mysql and the date type is 1989-06-03
- 12 replies
-
- calculate age
- data field
-
(and 1 more)
Tagged with:
-
It is a date type
- 12 replies
-
- calculate age
- data field
-
(and 1 more)
Tagged with:
-
Hi guys, I'me trying to get the age of a user that i have in my database based on the data type field in database. So in my database in tha data field i have 20.02.1989 Now i want to display the age of the user with a specific ID, i must mention that i want to display the age of all users that will be register in the database. How can i do that because i've tried a lot of things and not of them seems to be working. My code is below: $dateValue = "SELECT EXTRACT(YEAR FROM data_nasterii) FROM bonacuora_clients WHERE id='$id'"; $c=date('Y'); $varsta = $c-$dateValue; Thank you!
- 12 replies
-
- calculate age
- data field
-
(and 1 more)
Tagged with: