39,388 Topics

Member Avatar for
Member Avatar for Noth

Hi guys. I am seriously confused with this issue. I've set up some pages to ban, unban and approve a user. On localhost, it works fine. I can ban them and their record is updated to show that. I can unban them and again, it's updated. I can also approve …

Member Avatar for digital-ether
0
169
Member Avatar for adishardis

Hi, I use this script to extract and insert the desired variables to mysql.It does the job. $xml = new SimpleXMLElement('file.xml'); foreach($xml->loanaccount as $mess){ $account_number= mysql_real_escape_string($mess->account_number); $main= mysql_real_escape_string($mess->main); $type= mysql_real_escape_string($mess->{'application-array'}->{'application-type'}), $date= mysql_real_escape_string($mess->{'application-array'}->{'application-date'}), //insert into databse mysql_query("INSERT INTO account (account_number, main) VALUES ('$account_number', '$main')") or die(mysql_error()); echo "inserted into mysql<br /><br …

Member Avatar for adishardis
0
216
Member Avatar for mpc123

HI , I basically have made something that I require work in html but now trying to convert to get the results from data base but get this error and cant work out how to change it, if someone could help unexpected T_STRING, expecting ',' or ';' on line 69 …

Member Avatar for mpc123
0
150
Member Avatar for mpc123

Hi Hope someone can help with this. I have javascript set up how i want it in a normal html page but now need to ensure i can call a result using php with it. My code throws out an error The code states Parse error: syntax error, unexpected T_STRING, …

Member Avatar for mpc123
0
153
Member Avatar for Aaron_JY

Hey there. I'm having a bit on an issue with adding new data to an SQL table on my webserver. I'm trying to update data in the table through php, but for an unknown reason the script returns no errors but refuses to update the SQL table with the content …

Member Avatar for Aaron_JY
0
173
Member Avatar for ska_defender

In my country youtube is blocked. my website is based on embedding youtube videos through a custom player (jwplayer), so id like to have a php proxy for embedded videos to unlock those for my contry users i dont have a clue how to solve this issue and hope to …

Member Avatar for cereal
0
829
Member Avatar for asaidi

Hi i have a checkbox in my script <input type="checkbox" name ="pulse[]" value="1" checked>1<br> <input type="checkbox" name ="pulse[]" value="2" checked>2<br> <input type="checkbox" name ="pulse[]" value="3" checked>3<br> <input type="checkbox" name ="pulse[]" value="4" checked>4 and in my program i read the value and i test if the choice was 1 send it …

Member Avatar for asaidi
0
133
Member Avatar for staffmbm

I'm getting stuck with this code. I'm not getting data in second page after form submit. <?php session_start(); $user = $_GET['Type']; include "mysqlConnect.php"; //check for a page number. If not, set it to page 1 if (!(isset($_GET['pagenum']))){ $pagenum = 1; }else{ $pagenum = $_GET['pagenum']; } //query for record count to …

Member Avatar for LastMitch
0
384
Member Avatar for diether.silverious

Hi guys, this codes works perfectly to me, except that i would like to add pricetotal in session variable. my problem is pricetotal does not display values when i use print_r. Heres the output when i use print_r to display session variable: Array ( [0] => Array ( [item_id] => …

Member Avatar for broj1
0
217
Member Avatar for Noth

Hi guys. I'm just wondering why this function always returns true, no matter what the $user_id is. The $user_id variable is determined by what is retreived from the $_SESSION. I am well aware that mysql_* functions are being depreceated etc, no need to tell me :P Thanks guys! function user_mod() …

Member Avatar for veedeoo
0
199
Member Avatar for cdays
Member Avatar for kitschkath

Hi there~ I am kinda coding a verrry simple information system which uses Javascript. I am not familiar with JS and I only know the basics, but maybe what I'll ask is a veeery simple one but oh well, should I be asking if I found a solution after searching …

Member Avatar for urtrivedi
0
224
Member Avatar for AARTI SHRIVAS

i currently using mysql for database i want to use mysqli can any one tell me any other php server is required for it or i can use it in my bitnami wampstack 5.3.17.0 apache server.

Member Avatar for diafol
0
208
Member Avatar for GraficRegret

I need to build a filtering function for the website I am working on, however I am not certain where to even start, should I be working in PHP, Javascript, Jquery or what? The way this is set up, there is a column of buttons set up on the side …

Member Avatar for GraficRegret
0
174
Member Avatar for Vijaysurya

HAi everybody, I need help in flowing code i want to people not equal to friend means show addas friend buuton otherwise not show button this code show button more times what is the problem in my logic anybody plz help me. This is my friends get query. $query=$db->prepare("SELECT p.friend_id …

Member Avatar for LastMitch
0
309
Member Avatar for sabar

Hi friends, I tried to implement this features in my system http://www.agner.org/software/phpmenu/?e=0,36ood I understand that I need to change the basedir $_SERVER['DOCUMENT_ROOT'] . '/phpmenu/menu/tail.php' but when I upload to the server (some more files as in readme.txt) It was successful in the previous server. the url : (just example) mysistemname.uat.ac.de …

Member Avatar for LastMitch
0
138
Member Avatar for SphirosOkelli

I am learning php, and am developing an address book on my website that will put info into a data base I am storing on my vps. However, I am struggling to understand the use of magic quotes as a security measure and wondered if anyone had a good suggestion …

Member Avatar for Zagga
0
210
Member Avatar for garyjohnson

I have tried every solution I have come across and am still not getting any results. I have a comment box and I am trying to remove all repetative new lines or `/r/n` from the input. if (isset($_POST['comment'])) { $comment = mysql_real_escape_string($_POST['comment']); $comment = filter_var($comment, FILTER_SANITIZE_STRING); $comment = nl2br($comment); //this …

Member Avatar for garyjohnson
0
2K
Member Avatar for lexaeterna

im having a hard time coding my php script. it always says "no database selected" but i dont think there is something wrong with my code. here it is: <?php $con = mysql_connect("localhost","",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db('try',$con); $result = mysql_query("SELECT * FROM emptbl") …

Member Avatar for LastMitch
0
156
Member Avatar for Samyx

Hello Everyone, I am trying to learn php along with Dojo. So I am testing how to create a bar graph from data in my mysql database. However, I am having a problem. I can't seem to be able to read the data. I am posting the code below so …

Member Avatar for broj1
0
255
Member Avatar for magicmarkuk

Hi I have the following piece of code: $multiLinks = array(); foreach ( $matches[0] as $k => $match ) { if ( $post->multiurl_token ) { if ( strpos($matches[2][$k], 'http://mysite.com') === false ) { $multiLinks[$matches[2][$k]] = $match.coes[3][$k]; } } else { $multiLinks[$matches[2][$k]] = $matches[3][$k]; } } I want to add an …

Member Avatar for magicmarkuk
0
128
Member Avatar for Fiorentino01^

Hi, I am doing Home & Learn PHP Tutorial.I got to the lesson about forms. I keep getting this error: PHP Notice: Undefined index: username in C:\inetpub\wwwroot\basicForm.php on line 7. This is the code: <!DOCTYPE HTML PUBLIC -//W3C/DTD HTML 4.01 Transitional//EN"> <html> <head> <title>A Basic Html Form</title> <?PHP $username = …

Member Avatar for Fiorentino01^
0
255
Member Avatar for Tinnin

Hi all, I'm using PHP with PHPExcel to create an excel sheet that I can then send as an email using mail(). Everything is working but the conditional formatting. My code is as follows for the conditional formatting part: // Conditions for data $objConditional1 = new PHPExcel_Style_Conditional(); $objConditional1->setConditionType(PHPExcel_Style_Conditional::CONDITION_CELLIS) ->setOperatorType(PHPExcel_Style_Conditional::OPERATOR_GREATERTHAN) ->addCondition('15'); …

Member Avatar for Tinnin
0
2K
Member Avatar for davy_yg

I was just wondering what is the function of php framework, such as codeigniter. Does it really makes the process of programming faster?

Member Avatar for mrleewood
0
243
Member Avatar for delta_frost

<?php $filename = $_FILES['file']['name']; $tempname = $_FILES['file']['tmp_name']; if(isset($filename)){ //echo $filename; $directory = 'E:/php_uploads/'; move_uploaded_file($tempname,$directory.$filename); echo 'Done'; } else{ echo 'No file selected'; } ?> <form method="POST" action= "fileupload.php" enctype = "multipart/form-data"> <input type="file" name="file"><br/><br/> <input type="submit" value="Submit"> </form> The enctype is correct.The element names correspond to those in the php …

Member Avatar for delta_frost
0
203
Member Avatar for violetlyn.sumayo

<form method='POST' enctype='multipart/form-data' name='frmmain' action='uploadfile.php'> <br> <label for='title'><center>Event Title:</center> </label> <center><input type="text" name="title" size="40"></center> <br> <input type="file" name="image_file" size="40"> <br> <input type="submit" value=" Upload File " name="action" font="Papyrus"> </form> <br> </center>

Member Avatar for Bachu
0
571
Member Avatar for ckjaseem

Hi , Can anyone tell how I will send the local time zone to the server and so that I can convert the unix time(coming from the database) to the local time and display it on the clients side using php (In short I dont want to use javascript when …

Member Avatar for LastMitch
0
384
Member Avatar for joshl_1995

Hello Community, I was wondering if there is a way to backup my mysql database.

Member Avatar for diafol
0
225
Member Avatar for garyjohnson

Hi, I am using the Like %$search% clause in my query to find results in my database, and I was wondering if this is the most effective and efficent way to do this?

Member Avatar for diafol
0
158
Member Avatar for davy_yg

I wonder why it doesn't want to retrieve the P_id information when I press hapus/delete button. It suppose to bypass P_id value so that I know which to delete. The url remains empty: http://localhost/innovation/script_shop/hapus.php?P_id= <?php $result = mysql_query("SELECT * FROM stock") or die(mysql_error()); echo "<table border=1>"; echo "<tr>"; echo "<th>Produk</th><th>Jumlah</th><th>Tanggal</th>"; …

Member Avatar for simplypixie
0
104

The End.