hi, I am stuck trying to figure out how to build a table to display agents names, (that I already have, mysql table etc...) but now I need to add columns dynamicaly. I need to add (programs in witch agents are enroled, and a status of the program ( in-progress, not-done, etc). The part that I can figure out is where would I save the status of the agent in the program. I have enroled-agents table: (id, name, email) displays a basic mysql-php-html table; then I have programs table: (id, name, description, avaiable-status) When i place them together, where how …

Member Avatar
Member Avatar
+0 forum 4

I'd like to get all of a mysql table's col names in a select box, and display the selected column name in a table. I just want to select one column at a time to display it in a single column table. I am assuming this can be done with a single query for all columns because they all will be displayed in the same table format. What I did so far is this: <html> <head> </head> <body> <table id="tbresult"> <tr> <th>Column</th> </tr> <?php include ("config.php"); $sql = "SHOW COLUMNS FROM mytable"; $result = mysqli_query($conn,$sql); while($row = mysqli_fetch_array($result)){ echo "<tr><td>" …

Member Avatar
+0 forum 0

Hello i made a ionic searchbar script returns the items[] ok but i want to connect it with my php authservice and return the results from a php function. I already connected my app with the authservice and i have returned JSON data in other pages so the authservice works fine i just don't know how to put the php function in here this.items = [ { title: 'one' }, { title: 'two' }, { title: 'three' }, { title: 'four' }, { title: 'five' }, { title: 'six' } ]; this is what i've done so far. searchPage.ts @Component({ …

Member Avatar
+0 forum 0

I have an If Statement that isnt loading the right image any help would be great <?php if($formattedNum6 > $PeriodSalesTarget):{ echo '<img src="images/TargetMetGreen.png" alt="" />';} elseif($formattedNum6 > $CummulativePeriodSalesTarget):{ echo '<img src="images/TargetMet.png" alt="" />';} else:{ echo '<img src="images/TargetNotMet.png" alt="" />';} endif; ?> $formattedNum6 = 515,839 $PeriodSalesTarget = 1,366,000 $CummulativePeriodSalesTarget = 503,600 So it should show TargetMet.png but instead is showing TargetMetGreen.png If i change the PeriodSalesTarget to 999,999 it works so looks like it isnt treating the values as numbers but i dont know how to fix

Member Avatar
Member Avatar
+0 forum 2

Can anyone tell me how to retrieve records from database one at a time.. I am attaching a sample code here: [CODE]include('connection.php'); $sql1="SELECT * FROM question_master"; $result=mysql_query($sql1); while($row = mysql_fetch_array($result)) { echo $row['Question']; }[/CODE] Let me explain the code.. There is a table named "question_master" (containing some questions) in database with a field named "Question". This code display all the questions stored in the table into the screen. [B]My problem is here[/B] [B]I want to display the questions one by one. Like when we click the next button it will display the next question and so until all the records …

Member Avatar
Member Avatar
+0 forum 10

Hello i want to make a script that allows the user to record audio from his device mic and then store it as a .mp3 or .wav file on my database. Does anyone knows any tutorials or scripts? I found this one `http://stackoverflow.com/questions/16413063/html5-record-audio-to-file` but i dont know to make it a file and then store it. Any help?

Member Avatar
Member Avatar
+0 forum 31

I have scenario where one user can refer two codes to other one will become right and other left.Now this right can have two child left and right and so on same for left child user.... So this is binary tree like strucutre so i am selecting a user from database which current login user now binary tree will be displayed.I have coloumn in database which is postion which will have value left or right.So for current login user there will be rows returned one is left and other right now i want to continue to process this thing till …

Member Avatar
Member Avatar
+0 forum 1

Hello every one i am having one doubt i have a set of links[url].Now there is pave ackages like 6 links,25 links package. if two user select 6 link each day and both will have same links[url] .now i when user log in then on adversitment page he visit each link one by one and as same set of link is with another user so i want to show these links to each user such that if particular user visit it then button become disable for it... following is code and table structure i am really confused with logic releated …

Member Avatar
Member Avatar
+0 forum 2

Hi, I am looking to create a MySQLi class(MVC pattern), I already have the following functions: Query, Execute, Results. Below is a PDO version of a Bind statement and was wondering if you could do the following in MySQLi or something similar in MySQLi: public function bind($param, $value, $type=''){ if(is_null($type)){ switch(true){ case is_int($value): //Thinking something like, for integer etc $type = mysqli_stmt::bind_param(i); $type = PDO::PARAM_INT; break; case is_bool($value): $type = PDO::PARAM_BOOL; break; default: $type = PDO::PARAM_STR; } } $this->stmt->bindvalue($param,$value,$type); } Then in my MySQLiUser class where I want Bind to be called $database->query(SELECT/INSERT/UPDATE/DELETE); $database->bind($type, $userName); $database->execute(); $rows = $database->results(); Any …

Member Avatar
Member Avatar
+0 forum 3

hello i'm just training myself on web development so i wanted to create a drop down menu wich i have post before about it! so i get the html code and css and the javascrip code of the bootstrap header menu and i want to customize it for my website menu, but the problem is in my data base i have 3 data but my meny displays only 2 and in the first drop down there is an error that is not in second and i can't figure out why the above pictures and my code explain lite more cleary …

Member Avatar
+0 forum 0

Hey everyone, I have a question about prepared statements for PHP and mySQL. I have been able to do them for a single row such as ID and such for a particular object, but is it possible to do a SELECT all command as well? I want to be able to print out the entire table in a page, but I don't know what to do exactly. I think the issue I have is with trying to fetch it or put it in a while loop. This is what I have. What you see commented out is what I had …

Member Avatar
+0 forum 0

Good Morning, Hopefully there is someone around this morning that can give me a quick and easy answer. Is there a relatively simple way to prevent a page from reprocessing data when someone hits the 'Refresh' button? I don't want to disable the refresh, but just prevent reprocessing and creating duplicate entries into a DB table or resending of an email or any number of things that you wouldn't want to be duplicated. I know there has to be a way to do it but for the life of me I just can't get it clear in my head, and …

Member Avatar
Member Avatar
+0 forum 2

Hey guys, I'm trying to reupdate a web application that I have going on right now. Originally, I had a php page connect to a database and have a dropdown menu with the list of user id's. When you select the user id, you can submit it and you will be sent to another php page that has that user's information on there so that you can update the information if necessary. Now, what I'm trying to do is implement Ajax into the first page so that when you select the user, the information will be shown below where you …

Member Avatar
Member Avatar
+0 forum 1

I have a custom function called "query" with PDO statement in the functions.php file: /** * Executes SQL statement, possibly with parameters, returning * an array of all rows in result set or false on (non-fatal) error. */ function query(/* $sql [, ... ] */) { // SQL statement $sql = func_get_arg(0); // parameters, if any $parameters = array_slice(func_get_args(), 1); // try to connect to database static $handle; if (!isset($handle)) { try { // connect to database $handle = new PDO("mysql:dbname=" . DB_NAME . ";host=" . DB_SERVER, DB_USERNAME, DB_PASSWORD); // ensure that PDO::prepare returns false when passed invalid SQL $handle->setAttribute(PDO::ATTR_EMULATE_PREPARES, …

Member Avatar
+0 forum 0

Hi everyone, tried to display next and previous records from the coding below but unable to do so.It suppose to display next records for the current user with the when user click "Next" but currently it doesn't display "Next" but only display "Random". When i clicked "Random", it displays next records for all users. The following message also is displayed ie "Champ: 'picid' dans field list est ambiguRandom". The same goes to "Previous". Please advise. Thanks. <?php error_reporting(E_ALL ^ E_NOTICE); $host = 'localhost'; $user = 'user'; $pass = ''; $dbname = 'pq'; $con = mysqli_connect($host, $user, $pass,$dbname); if(!$con){ die('Could not …

Member Avatar
Member Avatar
+0 forum 2

Hi everyone, am trying to display the next record with next button and previous record with previous button from 2 tables. But when i click next there is no record displayed eventhough there are records in the database. The same thing happens with previous button. Please advise. Thanks a lot. <?php error_reporting(E_ALL ^ E_NOTICE); mysql_connect("localhost","user",""); mysql_select_db("pq"); $_SESSION['userid']; // it will print the userid value if(isset($_GET['picid']) && (int)$_GET['picid']) $picid = $_GET['picid']; else $picid = 1; $_SESSION['kra']; $_SESSION['kpi']; $query = "SELECT * from ipd where userid='".$_SESSION['userid']."' and picid= '$picid' LIMIT 1"; $result = mysql_query($query); if($num=mysql_numrows($result)) { $record = mysql_fetch_assoc($result); $userid= $record["userid"]; $kra= …

Member Avatar
Member Avatar
+0 forum 3

Hi everyone, am trying to display report based on quarter ie Quarter1,Quarter2 etc. However,after keying in record for Quarter2, the report below does not display Quarter2 record but still Quarter1 record. Please advise how to make the report display Quarter2 record if the current month is Jun etc. Thanks a lot. <?php session_start(); $_SESSION['userid']; // it will print the userid value require_once("tcpdf_6_2_11/tcpdf/tcpdf.php"); // create new PDF document $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, "A4", true, 'UTF-8', false); // set document information $pdf->SetCreator(PDF_CREATOR); $pdf->SetAuthor('SD'); $pdf->SetTitle('UOP'); $pdf->SetSubject('PDF'); $pdf->SetKeywords('PDF'); // set default monospaced font $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); //set margins $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); //set auto page breaks …

Member Avatar
Member Avatar
+0 forum 7

Hi, am trying to display the filename after upload but can't display, instead error message "There are no files in the database" is displayed. Please advise. Thanks. <?php // Connect to the database $dbLink = new mysqli('localhost','user','','pq'); if(mysqli_connect_errno()) { die("MySQL connection failed: ". mysqli_connect_error()); } // Get the ID // Query for a list of all existing files $progressid=$row['Progressid']; //echo $progressid; $id= $row['id']; echo $id; $sql = 'SELECT `id`, `name`, `mime`, `size`, `created`,`Progressid` FROM `tfile` where `id`=$row['id']'; $result = $dbLink->query($sql); // Check if it was successfull if($result) { // Make sure there are some files in there if($result->num_rows == 0) …

Member Avatar
Member Avatar
+0 forum 6

Linux Mint I logged into phpmyadmin and set the password option to 'no password' and now I can't log in. If I enter the password I was using I get this error -> `#1045 Cannot log in to the MySQL server` and if I don't user a password at all I get this error. -> `Login without a password is forbidden by configuration (see AllowNoPassword)` Any ideas on how I get this working again so I can log back in? One more question about phpmyadmin. If the computer I do my development from is a different computer than the one …

Member Avatar
Member Avatar
+0 forum 8

hi i have a script that was made up for me a while ago it was working full but now its stopped can anyone see whats going off as the infprmation from the form is not echoing through to another page although its going to database heres database string to add to database $query = 'insert into events set etype = "'.$etype.'", edate = "'.$edate.'", region = "' .$region.'", pcode = "'.$pcode.'", town = "'.$town.'", title = "'.$title.'", advert ="' .$advert.'", ltm ="' .$ltm. '", user_id =' . $userid ; heres the sql table CREATE TABLE IF NOT EXISTS `events` …

Member Avatar
Member Avatar
+0 forum 2

Hi everyone. Am trying to send email reminder for users to update their progress 1 month before end of every quarter. So every February and May etc the email notification will be autosend to the users from the system. Below is the code. Please advise if this is the correct way of doing it or if there is any better way. Thanks a lot. <?php $month= $row['MONTH(CURRENT_DATE())']; //get email address's $con=mysqli_connect("localhost","user","","pq"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $result = mysqli_query($con,"SELECT email FROM tuser"); while($row = mysqli_fetch_array($result)) { if('$month'==2){ $to=$row['name']." <".$row['email'].">\r\n"; …

Member Avatar
Member Avatar
+0 forum 5

i have been able to pass value from form to ajax and to php to insert into my database. Now there is a value which determines whether to redirect to page 1 or page 2 after inserting. As well i alert that the form was successful. So i wanna know how to do pass this values back to ajax and how to redirect to the page i require.Thank you very much in advance.

Member Avatar
Member Avatar
+0 forum 3

Hi everyone, am trying to save excel/docs filename in mysql and then display the filename and open the file to edit. The filename can be save in mysql but unable to display the filename and open the file. Appreciate if you could advise. Thanks a lot. <div id="tabs-1"> <?php error_reporting(E_ALL ^ E_NOTICE); $con = mysql_connect("localhost","user",""); if (!$con){ die("Can not connect: " . mysql_error()); } mysql_select_db("pq",$con); $Picid = $_GET['Picid']; $nwQty = "SELECT * FROM progress WHERE Picid = '$Picid'"; // check if the progress is already $solution = mysql_query($nwQty); if(isset($_POST['submit'])){ if (mysql_num_rows($solution) == 0){ // put the progress in table $sql …

Member Avatar
Member Avatar
+0 forum 4

i have a value from my database. i want to select the most highest value and split it into say ten. then echo it in my select.Any help pls

Member Avatar
Member Avatar
+0 forum 3

so i decided to brush back up on my skills in html and i wanted to create website that has a login page for members and administrators or for new members to sign up i see php is the new thing. I have created the actual homepage and the links to different pages within the websites those that i want just for members/admin. only and those everyonecan seeif you can help em i would be much abliged thanks. by the way i am doing everythign from scratch using notepad

Member Avatar
Member Avatar
+0 forum 5

Hi everybody, i want know how make admin panel and to it news system via [b]PHP[/b] and [b]Mysql[/b]! Is here anybody who knows how make it, and if here is somebody who knows, then can you help me? I'll try make a website where is news about sport things what happens etc. My idea was that i will make it just for Finland users but if here is somebody who is interested, then we can make also it on English and Finnish! Like there is admin panel and we give to some users rights to make news in Finnish, and …

Member Avatar
Member Avatar
+0 forum 3

Can somebody help me to create an appointment scheduler with php/mysql that automatically create appointments.

Member Avatar
Member Avatar
+0 forum 1

Hi!!! i'm final year student in computer science and have chosen virtual classroom systems to be done as a project for my final year.. i would like to know the enhancements and the new features that could be added to the project so that i could try to add them into my final year project… also, please let me know how to add web conferencing to the project.. please give ur comment about this project too..!! thank u…

Member Avatar
Member Avatar
+1 forum 4

Hi i have 2 tables: film - filmid, filmname review - id, reviewtitle, filmreview, filmid i basically want to search for a film name thats in the film table then retrieve the review from the review table that matches the film, the match is found using the filmid as the id for the film name so far i have something like this but it only returns the film id and filmname //$searching=$_POST['searching']; //$searchfilm=$_POST['searchfilm']; //This is only displayed if they have submitted the form // if ($searching =="yes") // { // echo "<h2>Film Review</h2><p>"; //If they did not enter a search …

Member Avatar
Member Avatar
+0 forum 4

Hello all. I have a bit of a problem. I have a few php pages all encoded utf-8. A MySQL database, where it is possible to have characters like: 'á'é'ú'ő'ü' and so on, i have set with phpmyadmin to be utf8_hungarian_ci character encoding. Funny thing is, that when I write data back from table with query to webpage, everything is fine. The problem is, that in php it looks bad, and i would like to change that. like Háztartási gép should be Háztartási gép. Thanks for the help.

Member Avatar
Member Avatar
+0 forum 7

The End.