Stefano Mtangoo 455 Senior Poster
Stefano Mtangoo 455 Senior Poster
diafol commented: Peep into your computer! Love it :) +14
what error do you get?
Do you think I cannot use include in this case?
In other case, I use include and the css is still link to the page (eventhough not as many as this one).
there are too many css link. That's why I am trying to use include to simplify the code.
include('gallery/index.html');
basically is linking index.html codes and extract it (run it) in image_gallery.php.
Oh.. I just tried to place <link> tags inside <head> section but it does not work yet. The gallery/index.html does work if I run in by itself but not as an include function.
if the problem is what pritaeas described then go ahead and include them in head tag
<html>
<head>
<?php include (....); ?>
<head>
......
include('gallery/index.html');
what is this supposed to do?
The solution I would propose to JS problem is having legacy view for the same controller/Model. If it is disabled use legacy view. But it requires MVC
One more thing, the array does not save $gambar or picture. It is left blank my database.
trace it if it is in POST array (hint print_r($array)) and Check SQL if it gets included!
I am trying to print out the date when the data product was first entered. The data is stored in the database and I am trying to print it in the correct format. In my database is stored yyyy-mm-dd instead of dd-mm-yyyy.
if all you do is just store/display the date and nothing else, then store the value of UNIX time i.e time and format it to your need on display
Thanks for your replies. I think I have found the solution to my problem.
If (entered_name) in page is equal as (name) in database && (email_entered) in page is equal as (email) in databse then show error message
else insert entered details in database.
Can I do that?
that is it! go ahead implement it and mark thread solved :)
first use code tags. also in your script you dont do error checking may be assuming script is perfect. Please test the code and print any error
<?php
/*Set to error level to development modes*/
ini_set("display_errors", 1);
error_reporting(E_ALL);
if ( isset($_POST['username'])) {
$ret = add_to_database();
if (!$ret) {
print "Error: Database error";
} else {
print "Thank you for submission";
}
} else {
write_form();
}
//functions
function write_form() {
$self =$_SERVER['PHP_SELF'];
echo <<<EOT
<form action="$self" method="POST">
<table>
<tr>
<td>User Name:</td>
<td><input type="text" name="username" /></td><br/>
</tr>
<tr>
<td>E-mail:</td>
<td><input type="text" name="useremail" /></td><br/>
</tr>
<tr>
<td>Comment:</td> <textarea cols="50" rows="8" wrap="VIRTUAL" name="comment"></textarea>
</tr>
<tr>
<td> </td>
<td><input type="submit" /></td>
</tr>
</table>
</form>
EOT;
}
function add_to_database() {
$username = trim($_POST['username']);
$email = trim($_POST['useremail']);
$comments=trim($_POST['comment']);
mysql_connect("localhost","root","") or die("Couldn't connect to server");
mysql_select_db("comments");
check_user($username);
check_email($email);
$sql = "INSERT INTO dig_users (user_id, username, useremail,comment ) VALUES ('', '$username', '$email','$comment')";
echo $sql;
mysql_query($sql);
mysql_close();
return true;
}
//this will check whether there is user with same user name
function check_user($usr) {
$sql = "SELECT * FROM dig_users WHERE username='$usr'";
$result = mysql_query($sql);
if(!$result){
die("Function check_user failed: ".mysql_error());
}
$rows =mysql_num_rows($result);
if ($rows>0) {
print "The user $usr already exists. Please select another username.";
exit;
}
}
//checks that email is unique
function check_email($em) {
$sql = "SELECT * FROM dig_users WHERE useremail='$em'";
$result = mysql_query($sql);
if(!$result){
die("Function check_email failed: ".mysql_error());
}
$rows =mysql_num_rows($result);
#
if(is_resource($result))
{
if ($rows>0)
{
print "The e-mail address $em already exists. Please type another e-mail address.";
exit;
}
}
}
?>
The insert works! just there is a little prob. in the date format.
I use this code to capture todays date:
$tgl_masuk = date("d-m-y");
I use this code to print out date:
<td><?php echo $data['tgl_masuk']."</br>";?></td>
The print out a little bit a mesh:
2018-11-11 ( 18 november 2011)
how to change the print out to 18-11-2011 ?
PHP Manual is packed with examples on that
http://php.net/manual/en/function.date.php
Hi guys,
I finally managed to solve the issue. It was evstevem who gave me the clue of the notepad. Finally, i was able to change my file to .php from the .php.txt and it worked.
Thank you so much for all the support everyone.
I will be back with more queries since its just my first day of programming.
Thank you!!
Regards
Laya
Throw notepad, it is useless and stubborn when it comes to programming. Alternatively use something like NPP
Please mark thread solved!
data looks fine, you can comment them out and see if your code works!
suppose you have field in database called email and php form field named email then
$email = mysql_real_escape_string($_POST['email']);
$sql = "SELECT * FROM users_table WHERE email='$email'";
$res = mysql_query($sql)
if($res){
if(mysql_num_rows($res)>0){
//email found
else{
//email not found
}
}else{
// nothing came from db perhaps errors or such
}
//code totally untested!
if (isset($_GET)){
<form method = "POST"
Can you smell anything?
Hi
I recently installed XAMPP and tried my first test page by creating a sub-folder in htdocs namely password_test which containts 2 files: password.txt and an index.php.
While trying to execute i get the following: file:///C:/xampp/htdocs/password_test/
--------------
Index of C:\xampp\htdocs\password_test\
Name Size Date Modified
[parent directory]
index.php.txt 129 B 11/18/11 12:23:16 PM
password.txt.txt 13 B 11/18/11 11:55:39 AMI am just able to see the code i typed on clicking the files but not the result. Can someone telling me if i am traveling the wrong way.
Awaiting your reply
Thank you
Laya
rename the file index.php.txt to index.php
BTW did you use notepad?
can you add before insert query the code below and post output?
print_r($_GET);
die();
Change the relevant code to below and post error message here
$sql = "SELECT * FROM `dig_users` WHERE useremail='$em'";
$result = mysql_query($sql);
if(!$result)
die(mysql_error());
Thanks.
Now this is my code<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.js"> </script> <script type="text/javascript" > function toggleDiv(divId) { var el = document.getElementById(divId); if(el.style.display == 'none') { el.style.display = 'block'; } else { el.style.display = 'none'; } } </script> </head> <body> <a href="#" onclick="toggleDiv('form1');">Form 1</a> <a href="#" onclick="toggleDiv('form2');">Form 2</a> <div id="form1" style="display:none;"> <form > Name<input type="text" /> </form> </div> <div id="form2" style="display:none;"> <form> Surname<input type="text" /> </form> </div> <br /> </body> </html>
But How to hide form1 when clicked form2 and how to hide form2 when clicked form1?
By default both are hidden
Suppose user have JS disabled!
close the thread and never use REQUEST again ;)
Hey Steve, I know :)
Tha problem is that with GET is working but with POST and REQUEST is not.
mesaje_furnizori.php?furnizor=53443&file=mesaje.png&mesajTrimis=adsdasd&trimis=ok
This is the weird part ...
If I have to help you have to remove that bad $_REQUEST and we can then troublshoot together. PHP should remove REQUEST alltogether!
Pls read my signature, I don't want to yell at you :)
First, your class is mixing to many responsibilities.
You should be passing an already established database into your quiz class if it is needed.
Second, Your class should not be responsible for rendering the form as well, this is another responsibility that is mixed.
Third, you could probably benefit from a more robust class design.Think of the design like this:
- A "quiz" is a composite of "questions" that are rendered into a singular form.
- The quiz should be able to add and remove questions as well as do it in a batch fashion.
- Questions may need to be of different types, therefore rendered individually. (Multiple Choice, Select One, Input a Value)
- Think about a Question abstract or interface that all question types need to extend, they all have common functionality and/or methods but also specific details that need to be represented.
- When rendering a quiz, the ultimate goal would be to have a template for each question type, and a template for a quiz as a whole which would render the question templates into a form template and create the output.
It sounds like a lot more work, but the end result with be a quiz structure where you will be able to swap pieces and parts with little to no hassle, and also add or replace the questions and templates without touching other portions of your code.
you might want to look at one of those PHP framework!
Actually I have no idea about the implementation of the ctags. but it seems like an advanced lexical analyzer which can handle multiple languages
So any good tutorial for very new bee to the arena? I have not done this before!
finally I got it.
The problem is, when file first loaded, there is no such index as gambar in $_FILES array and hence the error. But when file is submitted then gambar is defined. So I wrapped whole gambar thing into if as attached file is. You should not get errors anymore!
BTW what is the language in comments, I was having trouble understanding some gambar et al ;)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Admin</title>
<link href="admin-style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="includes/navstyleadmin.css" />
<script type="text/javascript" src="includes/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="includes/superfish.js"></script>
<script type="text/javascript">
jQuery(function(){
jQuery('ul.menu').superfish({
animation: {opacity:'show',height:'show'},
speed: 'slow',
autoArrows: true
});
});
</script>
<style type="text/css">
<!--
.style1 {font-size: 12px}
-->
</style>
</head>
<body>
<div id="header">
<p><a href="#">Home </a>| <a href="index.php">Logout </a>| <a href="admin.php">Admin Panel</a></p>
<p> </p>
<p> </p>
<p> </p>
</div>
<div id="search">
<form action="search.php" method="post" name="login" target="_self" id="login" style="style.css" title="search">
<br>
<label>search :
<input type="text" name="search" id="search2" />
</label>
<br />
</form>
</div>
<div id="menu">
<?php //include ("includes/navigation_admin.php"); ?>
<?php
/*Set to production/Development modes*/
ini_set("display_errors", 1);
error_reporting(E_ALL);
include ("koneksi.php");
//$_REQUEST['simpan'] = isset($_POST['simpan']) ? $_POST['simpan'] : '';
$link = isset($_POST['link']) ? $_POST['link'] : '';
$gambar = isset($_FILES['gambar']) ? $_FILES['gambar'] : '';
$id = isset($_POST['id']) ? $_POST['id'] : '';
//var_dump($_FILES);
//SIMPAN DATA
if (isset($_POST['simpan'])){
$id = $_POST['id'];
$link = mysql_real_escape_string($_POST['link']);
//$gambar = $_POST['gambar'];
//print_r($_POST); die();
//Cek apakah ada file yang diupload
if(/*(!empty($_FILES['gambar'])) && */(!$_FILES['gambar']['error'] > 0)){
//print_r($_FILES);
//die("Here I failed");
//$gambar = uploadPicture('gambar');
$target_path = "images/";
$target_path = $target_path . basename( $_FILES['gambar']['name']);
//$gambar['name'] = $target_path;
if(move_uploaded_file($_FILES['gambar']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['gambar']['name']).
" has been uploaded";
// I add this to test insert data
mysql_query("INSERT INTO banner(link, gambar) VALUES('".$link."','".$gambar['name']."')");
} else{
echo "There was an error uploading the file, please try again!";
}
}
if (empty($id)){
$sqlstr = "INSERT INTO banner(link, gambar) VALUES('".$link."','".$gambar['name']."')";
//echo $sqlstr;
}else{
$sqlstr = "UPDATE banner SET link = '".$link."',gambar = '".$gambar['name']."' WHERE id =".$id;
$result = mysql_query($sqlstr) or die(mysql_error());
$confirmation = ($result)? "Data telah tersimpan.":"Gagal menyimpan data.";
$gambar['name'] = "";
$link = "";
$id = "";
}
//EDIT / DELETE MODE
if (!empty($_REQUEST['id']) && !empty($_REQUEST['mode'])){
if ($_REQUEST['mode'] == 'delete'){
$result = mysql_query("DELETE FROM banner WHERE id=".$_REQUEST['id']) or die(mysql_error());
$confirmation = ($result)? "Data telah terhapus.":"Gagal menghapus data.";
}elseif ($_REQUEST['mode'] == 'edit'){
$result = mysql_query("SELECT * FROM banner WHERE id=".$_REQUEST['id']) or die(mysql_error());
if ($data = mysql_fetch_array($result)){
$id = $data['id'];
$link = $data['link'];
$gambar['name'] = $data['gambar'];
}
}
}
}
?>
<div align="center">
<div style="width:700px;text-align:left;padding-top:25px;">
<div class="pageTitle">Banner Manager</div>
<?php //echo $confirmation; ?><br/>
<form method="post" enctype="multipart/form-data" action="<?php $_SERVER['PHP_SELF']?>">
<table width="700px" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>Link</td>
<td>
<input type="text" name="link" value="<?php echo $link; ?>"/> Contoh: http://www.garudanews.co.cc
<input type="hidden" name="id" value="<?php echo $id; ?>"/>
</td>
</tr>
<tr>
<td>Gambar</td>
<td><input type="file" name="gambar"/></td>
</tr>
<tr>
<td colspan="2">
<?php
if (!empty($_REQUEST['id'])){
?>
<img src="<?php echo $gambar['name'];?>" alt="gambar"/>
<input type="hidden" name="gambar" value="<?php echo $gambar['name']; ?>"/>
<?php
}
?>
</td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="simpan" value="Simpan"/></td>
</tr>
</table>
</form>
<hr/>
<table width="400px" border="1" cellpadding="2" cellspacing="0">
<tr>
<th>Banner</th>
<th>Action</th>
</tr>
<?php
//LOAD BANNER AND ACTION MODE
$result = mysql_query("SELECT * FROM banner");
while ($data = mysql_fetch_array($result)){
?>
<tr>
<td><?php echo $data['link'];?></td>
<td>
<a href="./banner_manager.php?id=<?php echo $data['id']; ?>&mode=delete">Hapus</a> |
<a href="./banner_manager.php?id=<?php echo $data['id']; ?>&mode=edit">Edit</a>
</td>
</tr>
<?php
}
?>
</table>
</div>
</div>
<?php
//include('includes/footer.php');
?>
if I comment out the navigation pannel, simply the admin nav would be disappeared.
I mean does error disappear?
Let me check error level in my apache/php
I wrote a lexical analyzer using C++ for a user define simple language. Since php is much more complex you better use a lexical analyzer generator. Read http://dinosaur.compilertools.net/
you mean ctags is lexical analyzer?
Yes, I know that you don't want any syntax highlighting. That is why I said that you just need to identify the keywords, variable names, functions etc using lexical analyzer. ctags is good if can read the tag file line by line and split to identify useful parts.
Good then, I want to write something similar to ctags but a very lightweight and I wanted to know the tricks behind so that I don't fall in a ditch someone have fallen before :)
Well, I only adjust couple things to my machine that you comment out such as the includes function("includes\koneksi") and enable the admin navigation panel. Other then that, I just tested the code that gave me.
Mmmm.. I don't quite understand the explanation so what other changes do I need to make?
what happens if you comment the nav pannel?
To do the syntax highlighting, first we have to identify the syntax to be highlighted. I think that is the first step you have to take. You do not have to do syntax highlighting. You just need to identify the keywords, variable names, functions etc.
Using Java Reflection we can inspect the fields (member variables) of classes and get / set them at runtime. But I do not think PHP has something like that. My best guess is that you have to implement a lexical analyzer.
I don't need any highlighting, I need parsing files and getting entities like I showed example above. I need how to do it just like ctags does but not everything that ctags does!
How can I export the data which is in excel format?
As Rich said use CSV. Excel can well import it
Can images or Videos be embedded in PHP?
Yes why not! Aren't they just html done with echo?
$img= "<img alt='blah blah' src='image.png' />";
echo $img;
<?php $filename ="excelreport.csv"; $contents = "testdata1;testdata2;testdata3; \n"; header('Content-type: application/ms-excel'); header('Content-Disposition: attachment; filename='.$filename); echo $contents; ?>
I had given a similar example in another thread. Well, csv or excel, the procedure is the same.
Where did this man go? He is missing (together with kkeith and other longtime phpers)
I think you have to write a lexical analyzer for that by providing rules to identify lexemes. Try YACC -> http://en.wikipedia.org/wiki/Yacc
can you explain why I need that? I don't need syntax highlighting. Let me illustrate with example. I have file like this one
<?php
class YaddaClass{
private $variable;
public function __construct(){
}
public function getYadda($input){
}
}
?>
Now I need parser to give me something like
YaddaClass ctags.php 2;" c
YaddaClass::__construct ctags.php 4;" m
YaddaClass::getYadda ctags.php 8;" f
variable ctags.php 3;" p
Hi,
I want to parse PHP entities (classes, variables functions methods and properties) and save information on database (function signature, variable name et al). I'm trying to see alternatives for how I can archieve that with any language (the technique). So far I'm thinking of using regex to match stuffs but there might be better ways. I want to do almost same thing as ctags does.
Is there any other technique than using regex to match patterns?
Thanks!
I want to do something like
open php file>>>Parse entities>>>save to database (line number, signature, filepath et al)
example can be in PHP, no problem with that :)
thanks!
line 74: if(/*(!empty($_FILES)) && */(!$_FILES > 0)){
line 81: $target_path = $target_path . basename( $_FILES);
line 85: if(move_uploaded_file($_FILES, $target_path)) {
line 99: $sqlstr = "INSERT INTO banner(link, gambar) VALUES('".$link."','".$gambar."')";
(Notice: Uninitialized string offset: 0 in C:\xampp\htdocs\Masterlink\cgoods\banner_managerNEW.php on line 99)
I checked your code, I do not know why the undefined appears after you change to . I highlighted in red the cause of the undefined. I was thinking what you did was just to be consistent with form variable name correct?
------
the codes does capture the information and put it in the database. Just there are view similar errors that I have to deal with. how to handle the undefined thing? how to define $_FILES ?
did you do any change to a file or you tested the file I attached?
the codes does capture the information and put it in the database. Just there are view similar errors that I have to deal with. how to handle the undefined thing? how to define $_FILES ?
it works fine with me. note that I did some little changes and I don't remember all of them. Check with your old code and see what have changed which might not be in your machine (One of the things is I commented out includes)
I will test later, now I have another thing to do!
I have attached working file but here is your mistake, you used uploaded_file while your form says gambar. Also compare your formaer and current to see some little changes!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Admin</title>
<link href="admin-style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="includes/navstyleadmin.css" />
<script type="text/javascript" src="includes/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="includes/superfish.js"></script>
<script type="text/javascript">
jQuery(function(){
jQuery('ul.menu').superfish({
animation: {opacity:'show',height:'show'},
speed: 'slow',
autoArrows: true
});
});
</script>
<style type="text/css">
<!--
.style1 {font-size: 12px}
-->
</style>
</head>
<body>
<div id="header">
<p><a href="#">Home </a>| <a href="index.php">Logout </a>| <a href="admin.php">Admin Panel</a></p>
<p> </p>
<p> </p>
<p> </p>
</div>
<div id="search">
<form action="search.php" method="post" name="login" target="_self" id="login" style="style.css" title="search">
<br>
<label>search :
<input type="text" name="search" id="search2" />
</label>
<br />
</form>
</div>
<div id="menu">
<?php //include ("includes/navigation_admin.php"); ?>
<?php
include ("koneksi.php");
//$_REQUEST['simpan'] = isset($_POST['simpan']) ? $_POST['simpan'] : '';
$link = isset($_POST['link']) ? $_POST['link'] : '';
$gambar = isset($_FILES['gambar']) ? $_FILES['gambar'] : '';
$id = isset($_POST['id']) ? $_POST['id'] : '';
//var_dump($_FILES);
//SIMPAN DATA
if (isset($_POST['simpan'])){
$id = $_POST['id'];
$link = mysql_real_escape_string($_POST['link']);
//$gambar = $_POST['gambar'];
//print_r($_POST); die();
}
//Cek apakah ada file yang diupload
if(/*(!empty($_FILES['gambar'])) && */(!$_FILES['gambar']['error'] > 0)){
//print_r($_FILES);
//die("Here I failed");
//$gambar = uploadPicture('gambar');
$target_path = "images/";
$target_path = $target_path . basename( $_FILES['gambar']['name']);
//$gambar['name'] = $target_path;
if(move_uploaded_file($_FILES['gambar']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['gambar']['name']).
" has been uploaded";
// I add this to test insert data
mysql_query("INSERT INTO banner(link, gambar) VALUES('".$link."','".$gambar['name']."')");
} else{
echo "There was an error uploading the file, please try again!";
}
}
if (empty($id)){
$sqlstr = "INSERT INTO banner(link, gambar) VALUES('".$link."','".$gambar['name']."')";
//echo $sqlstr;
}else{
$sqlstr = "UPDATE banner SET link = '".$link."',gambar = '".$gambar['name']."' WHERE id =".$id;
$result = mysql_query($sqlstr) or die(mysql_error());
$confirmation = ($result)? "Data telah tersimpan.":"Gagal menyimpan data.";
$gambar['name'] = "";
$link = "";
$id = "";
}
//EDIT / DELETE MODE
if (!empty($_REQUEST['id']) && !empty($_REQUEST['mode'])){
if ($_REQUEST['mode'] == 'delete'){
$result = mysql_query("DELETE FROM banner WHERE id=".$_REQUEST['id']) or die(mysql_error());
$confirmation = ($result)? "Data telah terhapus.":"Gagal menghapus data.";
}elseif ($_REQUEST['mode'] == 'edit'){
$result = mysql_query("SELECT * FROM banner WHERE id=".$_REQUEST['id']) or die(mysql_error());
if ($data = mysql_fetch_array($result)){
$id = $data['id'];
$link = $data['link'];
$gambar['name'] = $data['gambar'];
}
}
}
?>
<div align="center">
<div style="width:700px;text-align:left;padding-top:25px;">
<div class="pageTitle">Banner Manager</div>
<?php //echo $confirmation; ?><br/>
<form method="post" enctype="multipart/form-data" action="<?php $_SERVER['PHP_SELF']?>">
<table width="700px" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>Link</td>
<td>
<input type="text" name="link" value="<?php echo $link; ?>"/> Contoh: http://www.garudanews.co.cc
<input type="hidden" name="id" value="<?php echo $id; ?>"/>
</td>
</tr>
<tr>
<td>Gambar</td>
<td><input type="file" name="gambar"/></td>
</tr>
<tr>
<td colspan="2">
<?php
if (!empty($_REQUEST['id'])){
?>
<img src="<?php echo $gambar['name'];?>" alt="gambar"/>
<input type="hidden" name="gambar" value="<?php echo $gambar['name']; ?>"/>
<?php
}
?>
</td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="simpan" value="Simpan"/></td>
</tr>
</table>
</form>
<hr/>
<table width="400px" border="1" cellpadding="2" cellspacing="0">
<tr>
<th>Banner</th>
<th>Action</th>
</tr>
<?php
//LOAD BANNER AND ACTION MODE
$result = mysql_query("SELECT * FROM banner");
while ($data = mysql_fetch_array($result)){
?>
<tr>
<td><?php echo $data['link'];?></td>
<td>
<a href="./banner_manager.php?id=<?php echo $data['id']; ?>&mode=delete">Hapus</a> |
<a href="./banner_manager.php?id=<?php echo $data['id']; ?>&mode=edit">Edit</a>
</td>
</tr>
<?php
}
?>
</table>
</div>
</div>
<?php
//include('includes/footer.php');
?>
the file attached.
Please attach sechma (SQL and connection) so that I can test full script!
Yes i got this, but my code does not work.
which code? I cannot peep in your computer and see your code. You have to post your RELEVANT current code!
Yes I have done in controller class only .
can you post current code?
INSERT INTO banner(link, gambar) VALUES('www.banner.com','Array')
I already replace $gambar with $gambar but still do not see the data inserted to database yet.
Can you attach current file? I can still see you arer inserting an array, hence somewhere you are still using $gambar (see red colored text in quote)
Thanks all, I was able to fix the error after lots of troubleshooting
Yeah that is right because you don't read the answers given here. IF only you have worked on my post quoted below, you could have saved yourself alot of pains
As ardav said you cannot do that but there is a workaround. Use ob_start. If you want to know why, someone did took a trouble of explaining here
Mh! What is exactly your question?
DeleteUser($_POST);?? What on earth is this beast?
make forms variables and ech time link is clicked echo the necessary variable!
@Tyskby...you have being a great deal of help to me and I appreciate this. I will try and make the necessary corrections to see what I will be getting inside the email address I specified inside the script. God bless you bloke!!!
next time you put only relevant part of script not whole thing. I could not even see where the problem is because I could not read the whole thing (617 lines)
May be pops are blocked in your mozilla check your settings plus this is JS question!
did you do it all in controller class in the first code only modifying the do upload?
Still dont get it, Sorry
what you don't get?