- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
35 Posted Topics
Re: 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! | |
Re: 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 … | |
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 ); }); }); }); | |
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 … | |
Re: > 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. … | |
Re: @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?? | |
Re: > 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 … | |
hi want my user to upload images to my server. There is a lot of security risks i am aware of, like: 1. client side validation is not a good idea. 2. PHP code can be embedded into various other data types.(like embeded in a image file) 3. by using … | |
Re: 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. | |
Re: 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 … | |
Re: 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. | |
Re: > I am having set of video files more than 60 in my local drive local drive??!!! > I like to create hyper link for all those video files in html, is your html file is on your local drive too??? you can easily do that with `a href` but … | |
hi, i want to change the image class on click on the image, i am also using radio input, here is my fiddle, check out and tell me what is wrong? [http://jsfiddle.net/Avik/7aKY3/1/](http://jsfiddle.net/Avik/7aKY3/1/) | |
Re: why not use pdo, and bind value, here is example: //for login form, it will check if the user exist or not and logged in if ($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['form_name'] == 'loginform') { $error_page = 'error.php'; $username = ''; $email = ''; $session_timeout = 3600*24*30; try { $pdo = … | |
i am trying to get all the result from my databse table but this query is not working. <?php try { $pdo = new PDO('mysql:host=localhost;dbname=articles', 'Avik', ''); } catch (PDOException $e) { $output = 'Unable to connect to the database server.'; echo $output; exit(); } try { $sql = 'SELECT … | |
Re: I am not sure what you mean by . "if user want to search id details for id : 11 the update.php will show open a page that can update that 11 details." But here is some hole i found in your code. 1. Dont use mysql, use mysqli or … | |
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 … | |
hi how can i fetch data from the database and stroe it into session variable. my code: $sql = "SELECT password, fullname, username, active FROM ".$mysql_table." WHERE (username = :username OR email = :username) AND password = :password"; $statement = $pdo->prepare($sql); $statement->bindValue(':username', $_POST['username']); $statement->bindValue(':password', md5($_POST['password'])); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); if … | |
hi, can anyone point out why is this script not working?? it does not inserting data into mysql.. here is the script: if ($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['form_name'] == 'signupform') { $newpassword = $_POST['password']; $confirmpassword = $_POST['confirmpassword']; $code = 'NA'; $active = '1'; if ($newpassword != $confirmpassword) { $error_message = … | |
Re: @gabrielcastillo. thnx, i was looking some thing like this, the code is really helpfull. :) | |
Re: i can see the end of the </select> tag on line 9 , but where is the starting point?? | |
Re: use a dropdown option instead of checkbox here is the html: //the php code for the function you need <?php if ($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['form_name'] == 'showhide') { $status = $_POST['status']; try { $pdo = new PDO('mysql:host=localhost;dbname=yourdatabasename', 'username', ''); } catch (PDOException $e) { $output = 'Unable to connect … | |
![]() | Re: the whole code is wrong, as everyone says there is so many errors. since it is for your school project, i will help you but plz take some time and learn php. :) <?php $dogage_yours=''; $output=''; if ($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['form_name'] == 'ageform') { $newusername = $_POST['age']; $dogage_yours= $_POST['age']*7; … ![]() |
hi, in the mysql we can fetch data and store them into variables, like the code below: if (mysql_num_rows($userquery) != 1) { die ("that member could not be found!"); while($row = mysql_fetch_array ($userquery, MYSQL_ASSOC)){ $first_name = $row['first_name']; $last_name = $row['last_name']; $email = $row['email']; $password = $row['password']; $sex = $row['sex']; $dbusername … ![]() | |
Re: add required="required" this will let the browser check if the field is required and if the data is inserted or not. it is so simple, no need to write any js or jquery or php. example field: <input name="title" type="text" id="password" placeholder="title" value="" required="required"> | |
Re: wysiwyg editor is good but i think you should code for yourself. there is a software WYSIWYG Web builder by pablo software, try them. what do you mean by integrate!! ![]() | |
i am having problem with converting my sign in script with pdo here is my script if ($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['form_name'] == 'loginform') { $success_page = $_COOKIE["redirect"]; $error_page = 'signup_error.php'; $indexlogcheck = 'home.php'; $mysql_table = 'users'; $crypt_pass = md5($_POST['password']); $found = false; $fullname = ''; $session_timeout = time()+60*60*24*30; try … | |
why is the code below is not working? $sql = "SELECT password, fullname, active FROM ".$mysql_table.""; $sql = $sql . "WHERE username = :username, password = :password"; $statement = $pdo->prepare($sql); $statement->bindValue(':username', $_POST['username']); $statement->bindValue(':password', md5($_POST['password'])); $statement->execute(); | |
Re: okay so in the body section where you put the create account, login, logout option, put the the code below: <?php if (!isset($_SESSION['MM_Username'])) { echo "<a href='login.php'>login</a><br><a href='signup.php'>create account</a>"; } else { echo "<button style='width:300px; height:50px;' onClick=\"location.href='./signout.php'\">Sign out</button>"; } </php> this should work. | |
hi, i am building a cms, when a user(already logged in) post anything, the script will check if the user is already exist or not if not it will create a new account(only save username and useremail) for the cms, so i can keep track of users. ok, so i … | |
hi i am building a cms system for my website, i am able to put data into a mysql database with the following code(look below). i also have a login system for accessing the cms, everything worked so far. I am facing a problem now. Ok so user signup info … | |
hi, i am interested in php link redirect. lets say i have a website with a lot of links, and most of the time if i change one file name i have to update that on everypage, it's irritating, as for other website like microsoft, they use links like **go.microsoft.com/fwlink/id3242** … | |
hi i am new to php and mysql, i am experimenting with a script for saving data to mysql database. and fetch the data on other page, i managed to get both of them without any trouble. But Here is the one problem. I added a additional input function to … | |
hi, i am new to mysql and also to php, i am trying to add a feature to a webpage, for showing some latest records from a mysql databse. i managed to show records from mysql database, but the problem is i only trying to show the first four records … |
The End.