39,393 Topics

Member Avatar for
Member Avatar for Jake.20

<?php //start php tag //include connect.php page for database connection Include('dbConnection.php'); //if submit is not blanked i.e. it is clicked. // var_dump($_REQUEST); session_start(); $errCount = 0; $user = $_POST['usernameTbx']; $pass = $_POST['passwordTbx']; if(isset($_REQUEST['submit'])!='') { //VALIDATE USERNAME TEXTBOX if($_REQUEST['usernameTbx']=='') { $errCount += 1; $_SESSION['error'] += array('usernameTbx' => "Username cannot be empty"); …

Member Avatar for Ketul_1
0
361
Member Avatar for centenond

Could some 1 please tell how to do timestamps that not rely on users computer? time(); and UNIX_TIMESTAMP() seems to rely on users pc Thanks

Member Avatar for diafol
0
436
Member Avatar for Paul_26

Hello i try to update the Image using Update Query in MySQL here's the code $pic = $_FILES['photo']['name']; $sql = "UPDATE `std_login` SET `imagename` = '$pic' WHERE `std_id_no` = '$std_id'"; the File upload works, but not Stored in Database. what to do? help me please.

Member Avatar for thirsty.soul
0
2K
Member Avatar for thirsty.soul

Hello DaniWeb, I am working on project in which admin generates dynamic query by selecting value from the First dropdown(program) then second dropdown (semester). The concept is that For example: if admin select "MSCS" from the first dropdown list and "3" from the second dropdown list. it should populate all …

Member Avatar for thirsty.soul
0
228
Member Avatar for eahdbz12

I need to get the list of diagnosed disease of the patient by choosing his name in the combo box,how can I do that? This is my code. <select name="pname" class="textfields" id="model" style="width:180px;" onchange="getVal1();"> <option id="0" >--Select Patient Name--</option> <?php $con=mysqli_connect("localhost","root","","dbnpatient"); if (mysqli_connect_errno()){ echo "Failed to connect to MySQL: " …

Member Avatar for thirsty.soul
0
220
Member Avatar for fariba123

i have a form with multiple checkbox. how to get the values that are checked. pls give a quick reaply. thanks

Member Avatar for bhagyashree.bhatt2
1
1K
Member Avatar for asheesh.mehta.54

<?php session_start(); mysql_connect("localhost","root",""); mysql_select_db("secure"); $name = $_POST['n']; $address = $_POST['x']; $order = "INSERT INTO user VALUES('$name','$address')"; if($result) { echo("Input data is succeed");} else { echo("Input data is fail");} ?> Error: No base was selected

Member Avatar for diafol
0
206
Member Avatar for mark.giles.14

Should apostrophe's be stored from a form into a database as ’ or as is ' If Im pasting articles into a database from another website do I need to convert the string on posting or leave them as it is.

Member Avatar for mark.giles.14
0
146
Member Avatar for Webville312

Dear all, I have this project that I was working on, and I put it on hold. Now I have revived it (Anyway that is not the issue). The issue is that I record students' information and record their entry class; However, as time goes on, the students either gets …

Member Avatar for Webville312
0
1K
Member Avatar for Kalaivani Nair

Hi everyone.. I'm using a very simple code to remove an item from session array. I just jave no idea why it returns SQL error like this in another page that initiated the deletion: You have an error in your SQL syntax; check the manual that corresponds to your MySQL …

Member Avatar for Kalaivani Nair
0
357
Member Avatar for vishal sata
Member Avatar for tapananand
0
93
Member Avatar for iConqueror

I have a form that asks the user to enter in an exam id that they want to delete from the exam table in the DB. The problem I am having is that even if the user enters in an id that does not match in the DB the script …

Member Avatar for diafol
0
276
Member Avatar for guyinpv

I am needing to build a custom portal for very specific needs in my client. They work with dozens of outside contractors and so the basic idea is that the portal will have separate login accounts for each person, including the CEO, accountant, IT, etc. Within each person's "home", they …

Member Avatar for iamthwee
0
317
Member Avatar for mokshi

Hi I need to generate six tables one by one but i am not able to generate with proper alignment its running out of page,I also checked pageheight,but its not working,My code is as follows and its very urgent some expert please hep me out in this issue.Thanks in advance …

Member Avatar for cereal
0
663
Member Avatar for kingston22

Hi, I'm new to web development sector. Can anyone suggest me some tips or blogs to gain information about the web development with emerging ideas and tricks.

Member Avatar for JorgeM
0
300
Member Avatar for Yorkiebar14

Hello, First off, this is probably not the right section, but the question is asking which language I should choose... so I don't know which forum topic it should go under... I am looking for a solution which would allow someone using an online panel running on my web server …

Member Avatar for veedeoo
0
298
Member Avatar for hriti

hello i want to display my pdf file on same page when i click on left side ...pdf will open in right div how i will do that???

Member Avatar for hriti
0
269
Member Avatar for thirsty.soul

Hello DaniWeb. I want to generate dynamic table for my cources table. I have tried this code but the header(semester) seems not to be working. <section class="entry-content"> <?php $counter=1; $slect="Select * from mcs"; $qry= mysql_query($slect); while($row=mysql_fetch_row($qry)) { if($counter==$row[1]) { print "<div class='heading vcMsg'> <h3>SEMESTER $row[1] </h3> </div> <div class='column message-column'> …

Member Avatar for thirsty.soul
0
194
Member Avatar for sushmaja.arumalla.9

Hi., I'm new to php using yii framework.The radiobuttons in the radio buttonlist are not displayed in IE9 and above.The code written is as follows. The radio buttons are displayed well in all the remaining browsers and also below IE-9(even not in IE-9). how to resolve this issue. <div class="services_opts"> …

Member Avatar for hericles
0
258
Member Avatar for payapart

Hello Friends, I have a mp3 search enging website ([www.mp3tracks.tk](http://www.mp3tracks.tk)). I am new. Do not know how to add a mp3 player just below the searched mp3 files from where the visitor can play, check and then download it. I have gone through many links in google, but non of …

Member Avatar for AleMonteiro
0
103
Member Avatar for nadiam

<?php if(isset($_POST['login'])) { require 'connection.php'; include 'password.php'; $email = $_POST['email']; $password = $_POST['pass']; $query = $dbh->prepare("SELECT id,name,email,password FROM users WHERE email = :email"); $query->bindParam(':email', $email, PDO::PARAM_STR); $query->execute(); $userData = $query->fetch(PDO::FETCH_ASSOC); $userEmail = $userData['email']; $hash = $userData['password']; if(password_verify($password, $hash) && $email == $userEmail) { session_start(); $_SESSION['sess_user_id'] = $userData['id']; $_SESSION['sess_name'] = $userData['name']; …

Member Avatar for thirsty.soul
0
314
Member Avatar for brugernavn

Hello, PHP gives me wrong calculation results. !? Example, PHP says that: (47,60*554,82)/100 = 263,7 The right result is: 264 My code: function kurs_usd($value) { // in use (usd to dkk) $kurs = mysql_fetch_array(mysql_query("SELECT kurs, time FROM pvs.kurs WHERE id = 'usd'")); if(time() >= $kurs['time']) { $data = explode("\n", file_get_contents("http://www.nationalbanken.dk/_vti_bin/DN/DataService.svc/CurrencyRatesXML?lang=da")); …

Member Avatar for brugernavn
0
621
Member Avatar for toxicandy

So I have a website that will upload a volunteer html form to our php database, I have most of the PHP working but a few main parts. Part1: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in /home/petrzilk/public_html/Database/update.php on line 192 I …

Member Avatar for pritaeas
0
179
Member Avatar for Vishnu_4

Hi, Am working on hooks wit codeigniter, am getting an error after applying hooks like "This webpage has a redirect loop". My hooks.php file : $hook['post_controller_constructor'] = array( 'class' => 'SessionData', 'function' => 'initializeData', 'filename' => 'auth.php', 'filepath' => 'hooks', 'params' => array() ); auth.php file: <?php class SessionData{ var …

Member Avatar for veedeoo
0
462
Member Avatar for fheppell

How would I go about appending a character to the end of every line except for the last line? The script won't know the length of the variable, as the last ten lines are loaded via tail. Thanks!

Member Avatar for arunmagar
0
172
Member Avatar for safi.najjar1

Hey folks, I've found 4 ways to call static methods and I'm confued about them. The ways are: **1- className::function() 2- $this->function() 3- self::function() 4- static::function()** so: *1-What are the differences between all of them? 2-What's the main reason for using static methods against non-static methods?*

Member Avatar for veedeoo
0
232
Member Avatar for dhani09

I'm trying to push items into an array. Each time a user clicks a book link, the id of the book is supposed to be added to an array.(The name and id of the book are pulled from the database.) But when i push a new book id, the existing …

Member Avatar for dhani09
0
163
Member Avatar for mwenyenia07

/////Get gl accounts class///// $sql_class = "SELECT cid,class_name FROM 0_chart_class WHERE cid>=3 ORDER BY cid ASC"; $result_class = mysql_query($sql_class) or die("Error in query: $sql_project.".mysql_error()); echo "<TABLE class='swPrpTopMenu'>"; echo "<th>Account Code</th><th>Name</th><th>Amount</th>"; while($row_class=mysql_fetch_array($result_class )) { $c_id=$row_class['cid']; $c_name=$row_class['class_name']; echo "<tr><td>$c_name</td></tr>"; ////////get accounts $sql_accounts="select ct.name,ct.class_id,cm.account_code,cm.account_name FROM 0_chart_types ct,0_chart_master cm WHERE ct.id=cm.account_type AND ct.class_id='$c_id' GROUP …

Member Avatar for mwenyenia07
0
211
Member Avatar for subrata_ushasi

Hi all, I am trying to start date and end date which is running in my local machine but when I am trying to run online it is not working . here is the code: echo " ONE"; $pDate = date('Y-m-d'); $curdate= (explode("-",$pDate)); echo $curdate[1]."<br>"; echo $curdate[2]."<br>"; $date=$curdate[1]; switch ($date) …

Member Avatar for subrata_ushasi
0
548
Member Avatar for devianleong

Hi, I need a table with dynamic header for first row and the rest of rows is the price. Example:http://www.adtravel.com.my/domestic/package/142-legoland-2d1n-johor-special Any idea to develop in admin page as well as product page? I want to use WYSIWYG editor but my client do not know how to use it.(Because the table …

Member Avatar for devianleong
0
245

The End.