Community Member
Member Avatar
THIS IS A DISCUSSION THREAD NOT Q&A. PLEASE SHARE YOUR THOUGHTS AND IDEAS.

I am planning on making a website which mainly will be driven by community users, mods, and admins. It will be a large project but i am ready for it, since community like stackoverflow and daniweb is … Topic by Eagle.Avik in Community Center
Member Avatar
I need your suggestion on something. I want to display a 'message notification' on my menu bar. I want it to be like the Facebook message notification. When I have a new message, '1' should show close to the message menu e.g. 'Message 1' (I can use CSS to style … Topic by uchejava in Web Development
Member Avatar
Eagle.Avik Replied To a Post in Displaying message notification
Topic by uchejava in Web Development
it is not really so simple and requires a bit of php and jquery knowledge to pull this off perfectly.

here is two way you can di this, one is to use a ajax call to look for changes in the database timely(maybe 10 second interval), but this make unnecessery … Reply by Eagle.Avik
Member Avatar
Topic by Niloofar24 in Web Development
also should not you use html form

<input type='submit' name='submit' value='Delete'" .$row['ID']. ">

how are you submitting it, are you using ajax and jquery??

as +lps mentioned, you should use ajax to call the script or use form.

here is a sollution:

you should probably use:

<form method="POST" action="<?php $_SERVER['PHP_SELF']; … Reply by Eagle.Avik
Member Avatar
Hello.
There is an html table in admin page, with head columns (POST ID | POST TITLE | POST AUTHOR | ACTION).
And in each row, will contain a post id, a post title, a post author that gets from database.
And in the Action column, there is a "delete" … Topic by Niloofar24 in Web Development
Member Avatar
Topic by Niloofar24 in Web Development
there is some problem with your script

$conn = new PDO("mysql:host=$servername;dbname=$dbname", $dbusername, $dbpassword

specially how are you using `$servername` and `$dbname` inside quote!! shouldn't it be:

$conn = new PDO("mysql:host=".$servername.";dbname=".$dbname, $dbusername, $dbpassword

cause i thought variables don't work inside wuote unless you are using double quote with single quote! Reply by Eagle.Avik
Member Avatar
Eagle.Avik Replied To a Post in ajax should call only once
Topic by Eagle.Avik in Web Development
thnx :) Reply by Eagle.Avik
Member Avatar
Eagle.Avik Marked Solved Status for ajax should call only once
hi, i want ajax to be called only once, but insted it calls everytime when i click on the button.
my script:


$(document).ready(function(){
$("#modal-launcher-user").click(function(){
$('#preloader_image_edit').show();

$.ajax({

url: "image_edit.php",
cache: false,

})
.done(function( html ) {
$("#preloader_image_edit").hide();
$( "#results_image_edit" ).append( html );
});
});
}); Topic by Eagle.Avik in Web Development
Member Avatar
hi, i want ajax to be called only once, but insted it calls everytime when i click on the button.
my script:


$(document).ready(function(){
$("#modal-launcher-user").click(function(){
$('#preloader_image_edit').show();

$.ajax({

url: "image_edit.php",
cache: false,

})
.done(function( html ) {
$("#preloader_image_edit").hide();
$( "#results_image_edit" ).append( html );
});
});
}); Topic by Eagle.Avik in Web Development
Member Avatar
hi, i want ajax to be called only once, but insted it calls everytime when i click on the button.
my script:


$(document).ready(function(){
$("#modal-launcher-user").click(function(){
$('#preloader_image_edit').show();

$.ajax({

url: "image_edit.php",
cache: false,

})
.done(function( html ) {
$("#preloader_image_edit").hide();
$( "#results_image_edit" ).append( html );
});
});
}); Topic by Eagle.Avik in Web Development
Member Avatar
Eagle.Avik Replied To a Post in saving into two tables
Topic by SirMahlon in Web Development
php
You really should not use `$_REQUEST`, Use `$_POST` instead.
Where is national health var. There is a lot of variable where you register request data but which one is for national health.

can you post your html form code for this. Reply by Eagle.Avik
Member Avatar
Eagle.Avik Replied To a Post in php image upload secure
Topic by Eagle.Avik in Web Development
i have modified the script again, this time i also allow user to crop the images themselves with js, and the user do not crop the image the script will do the job.

for client size resizing i am using imgareaselect (their url: [http://odyniec.net/projects/imgareaselect/](http://odyniec.net/projects/imgareaselect/))

and i also have to write … Reply by Eagle.Avik
Member Avatar
Eagle.Avik Began Watching Secure PHP encryption?
Is there a secure PHP encryption on which NSA hasn't put or isn't able to put in future of 20 years it's hands on? Topic by RikTelner in Web Development
php
Member Avatar
Eagle.Avik Replied To a Post in Secure PHP encryption?
Topic by RikTelner in Web Development
php
NSA is everywhere, if they want to steal they will, they are the government afterall. You are thinking about encryption!
Lol they even steal from gmail's high secure encrypted data.

Well you might consider rewriting the INTERNET, thats sound a lot of work. Gd luck. Reply by Eagle.Avik
Member Avatar
Eagle.Avik Replied To a Post in saving into two tables
Topic by SirMahlon in Web Development
php
Okay so let me get this straight, i just read your code, there you added `if ($result)` so you want the second query to run only if the first one is successful.

The only part i am not getting is you said if the user select some option(whatever checkbox or … Reply by Eagle.Avik
Member Avatar
hello Dany web friends
how to use cookies session in php, how to insert cookie in database table to rember user,
i would like to rember what page a user viewed on my website... and i think i can use cookie for SESSION but i don't know how to use. Topic by chrisschristou in Web Development
php
Member Avatar
Featured Eagle.Avik Replied To a Post in How to insert cookie in data base table
Topic by chrisschristou in Web Development
php

> can you please write with my code???


what?????? it is like:

`hey i cant build a house, will you build one for me :P`

just google about cookie and sessions you will find a lot of better tutorial.
also you will find a lot of better examples and demos. … Reply by Eagle.Avik
Member Avatar
Hey everyone,

I have a question about how to dynamically change a link based on the current page. Sort of like the "breadcrumb" feature in wordpress. However I don't want it to read as follows: "index.php", "about-us.php"..ect. I want the link to be something like "Home" "About Us" ..ect. How … Topic by geneh23 in Web Development
Member Avatar
Topic by geneh23 in Web Development
to get url like `www.test.come/home` or `www.test.come/about` here is what you need to do.

first create a folderin the main directory, and renamed it `home` now the url for this directory will looks like `www.test.come/about`

okay so what we need to do is rename your `about-us.php` to `index.php`
and move … Reply by Eagle.Avik
Member Avatar
Eagle.Avik Began Watching saving into two tables
my form has an option where user can choose to fill but should that option be choose then the form will will submit to two tables if not chosen the one table using php/mysql.table being patient and insurance table. Prompt assistance will be appreciated.thanks



$query = "insert into patients (title,patientid,name1, … Topic by SirMahlon in Web Development
php
Member Avatar
Eagle.Avik Replied To a Post in saving into two tables
Topic by SirMahlon in Web Development
php
> my form has an option where us
>
> should that option be choose then the form will will submit to two tables if not chosen the one table using php/mysql.table
>
> should that option be choose then the form will will submit to two tables if not … Reply by Eagle.Avik
Member Avatar
Eagle.Avik Began Watching Dynamic Jquery Slider
hello
can i have featured content slider dynamilcally???
if yes thn how??? Topic by hriti in Web Development
Member Avatar
Eagle.Avik Replied To a Post in Dynamic Jquery Slider
Topic by hriti in Web Development
@hriti

> i want to get image,thumnail and content from database

what do you mean by this??

if you store image url in the database, then you can fetch it.

or do you storing the image code itself in the database?? Reply by Eagle.Avik
Member Avatar
Eagle.Avik Replied To a Post in php image upload secure
Topic by Eagle.Avik in Web Development
well here is my code using `gd`, i have to rewrite a new script.
dont know if it is safe enough, what do you think is there any security gaps? is it better than the previous one?



<?php

include('../loginssn.php');

if($_FILES)
{

define('THUMBNAIL_IMAGE_MAX_WIDTH', 200);
define('THUMBNAIL_IMAGE_MAX_HEIGHT', 200);


function generate_image_thumbnail($source_image_path, $thumbnail_image_path)
{
list($source_image_width, … Reply by Eagle.Avik
Member Avatar
Topic by Eagle.Avik in Web Development
hello! is there anyone who can help me???? Reply by Eagle.Avik
Member Avatar
Eagle.Avik Replied To a Post in php image upload secure
Topic by Eagle.Avik in Web Development
i think i dont have `imagick` installed. i searched a bit and found that i have `gd library` installed as default which does the same. can you use `gd` instead of `imagick`, i dont want to install another library which does the same job(probably much more functionality that gd). Reply by Eagle.Avik
Member Avatar
hi, as the title says, i want to resize and preview image before i submit it to my server. it is because of reducing load to my server and also give the client ability to crop the image too.

i am using `imgareaselect` for cropping. and also using a javascript … Topic by Eagle.Avik in Web Development
Member Avatar
hi, as the title says, i want to resize and preview image before i submit it to my server. it is because of reducing load to my server and also give the client ability to crop the image too.

i am using `imgareaselect` for cropping. and also using a javascript … Topic by Eagle.Avik in Web Development
Member Avatar
I need suggestion for my Final Year Project(Web programming)! Topic by erum.saeed.75 in Web Development
php
Member Avatar
Eagle.Avik Replied To a Post in Suggest me some Project Ideas
Topic by erum.saeed.75 in Web Development
php
hi erum.saeed.75, dont you have anything to start with???? just create what you like..... it does not have to be the next great project like something, wordpress. :) gd luck. Reply by Eagle.Avik