39,402 Topics

Member Avatar for
Member Avatar for davy_yg

input_berita.php [CODE] //Simpan berita dan konfirmasi kepada subscriber if (isset($_REQUEST['ok'])){ $judul = $_REQUEST['judul']; $news = $_REQUEST['news']; $idKategori = $_REQUEST['kategori']; $tanggal = date('Y-m-d'); if (empty($_REQUEST['id'])) $sqlstr = "INSERT INTO berita(id_kategori, judul, isi_berita, tanggal)VALUES(".$idKategori.",'".$judul."','".$news."','".$tanggal."')"; else $sqlstr = "UPDATE berita SET judul='".$judul."', isi_berita='".$news."' WHERE id=".$_REQUEST['id']; $result = mysql_query($sqlstr) or die(mysql_error()); //Jika mode edit, …

Member Avatar for davy_yg
0
112
Member Avatar for wavyaquaeyes

HELP- I need to view my php files in the browser. I am running Apache server. I know only this much to put in the browser [URL]http://localhost/[/URL] /filename.php thanks

Member Avatar for dineshnbhatia
1
20K
Member Avatar for shrikant_77

[CODE]if(isset($_POST['listingType'])) { ini_set('magic_quotes_gpc', false); // magic quotes will only confuse things like escaping apostrophe //Get the item entered $listingType = $_POST['listingType']; $primaryCategory = $_POST['primaryCategory']; $itemTitle = $_POST['itemTitle']; if(get_magic_quotes_gpc()) { // print "stripslashes!!! <br>\n"; $itemDescription = stripslashes($_POST['itemDescription']); } else { $itemDescription = $_POST['itemDescription']; } $itemDescription = $_POST['itemDescription']; $listingDuration = $_POST['listingDuration']; $startPrice …

0
163
Member Avatar for aecha

Hi.. I have problem with my system which is the bar code image cannot been display after the bar code generate from the database. can anyone show me the correct way to call the data from database to generate and display in my system? when user click view card in …

Member Avatar for rpv_sen
0
2K
Member Avatar for NoviceCoder37

I keep on getting this error "Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in" from both of my while loop conditions. Can anyone review my code and let me know what I'm doing wrong? [code] <html> <head> <title>Task # 4 - Test Page</title> </head> <body> <?php $link …

Member Avatar for cbemerine
0
335
Member Avatar for atalkingfish

I have a page full of user-submitted updates and stuff. Basically the basic stuff. I am taking it out of a database. I have this so far: [CODE]$getnews = mysql_query("SELECT * FROM news ORDER BY $order LIMIT 50"); [/CODE] and $order is determined by a drop down menu on the …

Member Avatar for atalkingfish
0
1K
Member Avatar for atalkingfish

I have a website where you can log in with a session or with cookies (remember me) and I can't seem to get the logout to work. I have a code that goes on top of most pages (all pages that require one to be logged in) and it goes …

Member Avatar for atalkingfish
0
82
Member Avatar for sungkono

Hii All, i'm newbie in this forum and in php i got a problems, i was developing simple website i had 3 tables in there table request, table upload, and table feedback which in id_request is foreign key in table upload and table feedback 1. how to update the id_request …

Member Avatar for diafol
0
133
Member Avatar for BenzZz

Hi, Basically I'm creating and implementing a dynamic website as part of my uni final year project but i am a beginner in php so need some help. First, I'm not entirely sure about how i should go about creating the database, tables and inserting data. I don't mean in …

Member Avatar for BenzZz
0
114
Member Avatar for wonderlhily

[code=php] <?php $conn = mysql_connect("localhost", "root", "dotherz"); //connecting to database if($conn) //testing if the connection was stablished { mysql_select_db("orders", $conn); //selecting database from your localhost $qry = "SELECT * FROM customer WHERE customerId = 1"; //the query to get the first user $result = mysql_query($qry); //executing the qry and passing …

Member Avatar for diafol
0
164
Member Avatar for kaizokupuffball

Hi! I can't say im familiar with the .htaccess file. I need to create a htaccess file that will redirect the user if he manually tries to open a .txt file on the server, or tries to download it (example if the user tries to navigate to [url]www.domain.com/users/username/bio.txt[/url], then he …

Member Avatar for diafol
0
124
Member Avatar for bwls

Questions: Can I use a wildcard in unlink - ie: $myfile = '../pdf/'.$tnum .'*.pdf'; This results in an error: Warning: unlink(../pdf/36818*.pdf) [function.unlink]: No error in \purgepdf.inc.php on line 29 Any help would be greatly appreciated. Thanks, Bill

Member Avatar for bwls
0
113
Member Avatar for jacob21

I have a form having validation given below in java script. The problem is when i am inserting form data in a database,if there is any validation error,still added in database. please give me suggestion where to use PHP code I am using this code for insertion [CODE]<?php if(isset($_POST['submit'])) { …

Member Avatar for cereal
0
159
Member Avatar for davy_yg

banner.php [CODE] <link href="../style.css" rel="stylesheet" type="text/css" /> <style type="text/css"> </style> <div id="banner"> <div class="headerStyle"> <div style="padding:4px 0px;">&nbsp;Banner</div> </div> <?php include('koneksi.php'); $result = mysql_query("SELECT gambar FROM banner"); while ($data = mysql_fetch_array($result)){ echo "<img src="$data['gambar']">".'<br>'; } ?> </div> [/CODE] Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in C:\xampp\htdocs\php_template2\includes\banner.php on …

Member Avatar for cereal
0
4K
Member Avatar for cgull

Hello, I know this question was answered many times, and I looked at the answers but still can't find a solution. I have an index file that includes a contact form. The contact form action is itself, and if the form succeeds it should redirect to index.php?content=thankyou Althought the form …

Member Avatar for cgull
0
197
Member Avatar for vitaquous

I have no idea if I am doing this correctly. Eight years ago I was a C++ programmer, then I left the industry. I am lost and have been reading heaps on the web but do not know where to begin. I wrote a MySQL DB, I have populated the …

Member Avatar for vitaquous
0
236
Member Avatar for divyakrishnan

Hi... I want to move an uploaded file to another machine.I had given the file path to move_uploded_file() function including IP address .The folder is a shared folder.My code shown below. [ICODE]<?php if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: …

Member Avatar for emiola
0
118
Member Avatar for davy_yg

banner_manager.php [CODE] <?php include ("includes/koneksi.php"); //$_REQUEST['simpan'] = isset($_POST['simpan']) ? $_POST['simpan'] : ''; //$_REQUEST['link'] = isset($_POST['link']) ? $_POST['link'] : ''; //$_REQUEST['gambar'] = isset($_POST['gambar']) ? $_POST['gambar'] : ''; //$_REQUEST['id'] = isset($_POST['id']) ? $_POST['id'] : ''; //SIMPAN DATA if (isset($_REQUEST['simpan'])){ $id = $_REQUEST['id']; $link = mysql_real_escape_string($_REQUEST['link']); $gambar = $_REQUEST['gambar']; } //Cek apakah ada …

Member Avatar for davy_yg
0
220
Member Avatar for vinothaviji

Hi everyone... I finished my work upto retrieve the data from database and stored values in table looks like the phpmyadmin table. In table each row has one checkbox.if u click the check boxes the background color of the particular row is changed. my php code: [CODE] if($color==1) { echo …

0
61
Member Avatar for amear

i need function : i want to make game to figure the word meaning e.g: when i wrote a abcdf i want to convert to bacfd and when the page refresh again its change again to another word and never convert to the original word "abcdf " and i want …

Member Avatar for cwarn23
0
120
Member Avatar for Jazerix

Hey there so i just got started with php and im actually quite amazed with it and how easy it is to understand anyways, right now im trying to do some coding, where i want the script to check if the user exist, if the user exist it will show …

Member Avatar for lps
0
48
Member Avatar for jacksantho

Anyone please help me, just i am very new to this content management system. In drupal, i am having this following roles : students, teacher, principal. Students -> should have only access to see only their personal information and their marks. Teacher -> should have only access to see their …

0
39
Member Avatar for 54uydf

Hi, I have a php script that send emails, I want it to run daily on the server. I thought that CRON JOB can do that for me but the guy who owns the server told me now that he can only run SH file? shell script if I'm not …

Member Avatar for pritaeas
0
84
Member Avatar for disc

Hi All, I'm trying to access php-code on another url: Local php-code test.php: [CODE]ob_start(); include( "http://www.mysite.eu/ext.php"); echo "Local call!"; echo "External call: ".GetExternal( ); ob_end_flush(); ?>[/CODE] And the code on the other url in ext.php: [CODE]<?php function GetExternal( ) { $output = "This is external text"; return $output; } ?>[/CODE] …

Member Avatar for ohmagoleh
0
81
Member Avatar for sungkono

hii all, i've create upload website, i've been stuck with following error i had 3 tables in my database table request, table upload and table feedback table request : id_request;---primary key subjek; isi; pelaksana; table upload : id_upload,----primary key id_request,----foreign key filename, filedata, filesize, filetype table feedback : id_feedback,----primary key …

0
130
Member Avatar for davy_yg

banner_manager.php [CODE] <?php //if (!$_SESSION['login']){ // echo "Anda tidak berhak mengakses halaman ini."; // exit(); //} include ("includes/koneksi.php"); $_REQUEST['simpan'] = isset($_POST['simpan']) ? $_POST['simpan'] : ''; $_REQUEST['link'] = isset($_POST['link']) ? $_POST['link'] : ''; $_REQUEST['gambar'] = isset($_POST['gambar']) ? $_POST['gambar'] : ''; $_REQUEST['id'] = isset($_POST['id']) ? $_POST['id'] : ''; //SIMPAN DATA if (isset($_REQUEST['simpan'])){ …

Member Avatar for davy_yg
0
184
Member Avatar for Inny

Id like to show total number of users elsewhere on my site, and dont know which part of the following code calls that. I want to have 'some text[number of users here], and counting!' I need to strip out only the minimum code to display the total number within another …

Member Avatar for Inny
0
304
Member Avatar for kaosjon

Hi i am trying to sort out a complicated part of my website and its a bit complicated, so i will try and explain it as easily as possible. Basically i am dealing with two tables one has a list of records, the main field is offer_id, the second table …

Member Avatar for chrishea
0
91
Member Avatar for terexberd

Hey guys, I have a question that I need an answer to: How do you display a person's name and score? Say, for example, a user takes a quiz and gets 80% on it. I want this information to be displayed on the side of the screen for everyone to …

Member Avatar for mathieu89
0
124
Member Avatar for toms ace

Hello everyone, First of all I would like to introduce myself, I'm tom and I spend hours developing websites. Right, down to the serious stuff... I have made a nice little AJAX based commenting system, it shows the 5 latest posts, so, when a user posts a comment the list …

Member Avatar for Airshow
0
240
Member Avatar for sibymary

hi,i want to insert date into mysql table..but the date must not be current date.for example if i am giving 12-3-2003.then ,this date should be insert into the database...... thanks advance

Member Avatar for pritaeas
0
76
Member Avatar for kzip

-upload.php- [CODE]<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <form action="rename.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <td> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td><strong>Single File Upload </strong></td> </tr> <tr> <td>Select file <input name="ufile" type="file" id="ufile" size="50" /></td> </tr> <tr> <td align="center"><input type="submit" name="Submit" value="Upload" /></td> </tr> </table> </td> </form> </tr> …

Member Avatar for Stefano Mtangoo
0
157
Member Avatar for oldSoftDev

Hey guys, Recently a friend of mine asked me to help her with her magazine website. I gave this website a look and figured out that it might be that tabs are not directing to the right URL or there are some files missing from the server. I have never …

Member Avatar for reco21
0
132
Member Avatar for altaf123456

dear i am fasing problem in uploading files,uploading file is properly working in local host but when i upload the file its not working through admin area the condition is giving false and excute else statement kindly help me on it [CODE]if($_REQUEST['action']=="addwall") { $cat=$_REQUEST['category']; $sub=$_REQUEST['subcategory']; $folder="wallpapers/"; $path=$folder.$_FILES['file']['name']; if(move_uploaded_file($_FILES['file']['tmp_name'],$path)) { mysql_query("insert …

Member Avatar for Mohammed Ammar
0
86
Member Avatar for louie540

Hi. First off, I'm new to PHP. So you will have to be real specific with your answers. I'm trying to create a comments section under my news articles and I'm having a real hard time with it. At first I was wanting to make it so that a new …

Member Avatar for broj1
0
180
Member Avatar for sibymary

hi, here i am using library management system...now i got 1 problem with insertion of date into 2 rows in two different table in mysql.date is inserting through php page.with in a single time, i want to insert the date into 2 rows of 2 tables.the table names are issue …

0
77
Member Avatar for falakniazi

Hi, Can anyone tell me how to convert text to speech in PHP? There are some tools like festival and flite etc that can be used for converting text to speech. But i don't have much expertise in PHP.

Member Avatar for falakniazi
0
4K
Member Avatar for mikeSQL

Create the HTML we will be using. I will show the whole code and then break it down so you can see what each thing does. Let's start. Create a new html file called [B]index.html[/B]. HTML Code: [COLOR=#000080]<html>[/COLOR] [COLOR=#000080]<head>[/COLOR] [COLOR=#000080]<title>[/COLOR]AJAX Demo[COLOR=#000080]</title>[/COLOR] [COLOR=#800000]<script src='getnv.js'>[/COLOR][COLOR=#800000]</script>[/COLOR] [COLOR=#000080]</head>[/COLOR] [COLOR=#000080]<body>[/COLOR] [COLOR=#000080]<div id='menu'>[/COLOR] [COLOR=#000080]<ul>[/COLOR] [COLOR=#000080]<li>[/COLOR][COLOR=#008000]<a onClick='check_content("page.php?id=index")'>[/COLOR]Home[COLOR=#008000]</a>[/COLOR][COLOR=#000080]</li>[/COLOR] …

Member Avatar for kosher_12
0
247
Member Avatar for NoviceCoder37

Hello, Savior(s)! I have been given a task to do the following: [I]"Assume that you have a database with a table named "trainer" with fields (trainerID, userName, fullName, email): - create this DB and table then insert some random data manually - create sql query to check if there any …

Member Avatar for diafol
0
101
Member Avatar for ptermourra

Hello, I am having a similar issue. I am building a shopping cart. On my product details page I have this, which works fine by the way : [CODE] <?php // Check to see the URL variable is set and that it exists in the database if (isset($_GET['id'])) { // …

0
59
Member Avatar for davesmith437

Hi, This is what I'm trying to achieve...... An html table on a page which shows results from a series of races with the competitors listed on the x axis and the results per race on the y. Each series has a different number of races so it isn't possible …

Member Avatar for davesmith437
0
265
Member Avatar for Danny159

Hey, I need some help with working out if a timestamp is today or not... Eg - 1318245850 is Today - 1286709850 isnt today... Dan

Member Avatar for Danny159
0
116
Member Avatar for coleguitajuan

Hello, I'm trying to create a form inside another form that it submits it depending on the option you choose on the select field using the js event "onselected="this.form.submit" but Im not familiar how to use it, the initial code is like that: [CODE]<form name="form1" method="post" submit="form1.php"> <form name="form2" method="post" …

0
64
Member Avatar for davy_yg

Hi I have a bar which dropdownbox so transparant, in a way that I could hardly read its text because its overlap my content text and pictures. But its order superseed the side bar box. I could clearly read its text on the side but hardly read its text on …

Member Avatar for cwarn23
0
172
Member Avatar for cwarn23

Hi, this is cwarn23 just posting a link to a youtube video for those constantly redirecting users to google or lmgtfy.com but now here is another tool for you to use. I have posted a youtube video which you can use to teach all of those users how to read …

0
95
Member Avatar for davy_yg

Judul <<< First << Prev 1 Next >> Last >>> Judul File gambar image_gallery.php [CODE] <?php include('includes/header.php'); include('includes/koneksi.php'); $imgDt = isset($_POST['imgDt']) ? $_POST['imgDt'] : ''; //Save File if (isset($_REQUEST['save'])){ if (empty($_FILES['uploaded_file'])){ echo "Tidak ada file yang diupload."; }else{ $title = mysql_real_escape_string($_REQUEST['title']); //$uploadPath = uploadPicture("uploaded_file"); $uploadPath = $_FILES['uploaded_file']; $sqlstr = "INSERT …

Member Avatar for cwarn23
0
107
Member Avatar for newbie26

i have two submit buttons in one form. one is view and other is print. these two buttons has only one action in the form. both of them will go to another same page. but,how can i make it when i click view, the next page will be shown, when …

Member Avatar for broj1
0
260
Member Avatar for sammry

I am currently able to achieve number format as 1,000,000,000 but I want to get it as 1,00,00,00,000. How can I achieve this? can some one help please. Currently I use as below. [CODE]<? echo number_format($row["SUM(Amount)"],0); ?>[/CODE]

0
212
Member Avatar for muralibobby2015

i want to create dynamic swf files using swf file template. i have an embed code like this <EMBED src="http://mysite.com/120_600.swf?inner=http://mysite.com/brand/files/wirelessidea/79/BANNER-DIVERZONA_120X600.swf&url=http://mysite.com/trackingcode.php?aid=1&linkid=F1" quality=4 width='120' height='600' > </EMBED> in this [url]http://mysite.com/120_600.swf[/url] file is empty. now i am passing inner&url parameters to this swf file. automatically create swf file in 120_600.swf. when ever we …

Member Avatar for muralibobby2015
0
160
Member Avatar for sibymary

hi, here i was trying to create table with primary key and foreign key. i had used follwing codings...but getting error like[B]" Can't create table 'test.book' (errno: 150)"[/B]..thanku 4 any help [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html><head><title>Create Table</title></head> <body> <? /* Change next two lines */ $db="test"; …

Member Avatar for Raj sahaniya
0
141

The End.