Search found 15 matches

by andor1995
Fri Feb 24, 2012 1:45 pm
Forum: PHP General
Topic: Drop down menu
Replies: 1
Views: 441

Drop down menu

Hey , I'm trying to make a style changer, and I need a drop down menu. I want the items from the dropdown menu to be the folders name's from the "theme" folder. Is it possible? Like : theme/default theme/default2 These are the folders, and the items in the menu would be item 1: default item 2: defau...
by andor1995
Mon Feb 20, 2012 7:38 am
Forum: PHP Scripts
Topic: Header() problem
Replies: 3
Views: 1022

Re: Header() problem

Full code <? if(isset($_COOKIE['username'])): else: header ("Location:login.php"); endif; $user = $_COOKIE['username']; ?> <div id="header"> <a href="index.php"><img src="../../images/acp/logo.png" width="400" height="60" longdesc="http://andor-cms.no-ip.info/admin/" /></a> <? echo '<div id="user>"<...
by andor1995
Mon Feb 20, 2012 7:28 am
Forum: PHP Scripts
Topic: Header() problem
Replies: 3
Views: 1022

Re: Header() problem

Changed it, but it's still not working.

new code:

Code: Select all

if(isset($_COOKIE['username'])):
else:
header ("Location:login.php");
endif;
$user = $_COOKIE['username'];
by andor1995
Mon Feb 20, 2012 7:23 am
Forum: PHP Scripts
Topic: Header() problem
Replies: 3
Views: 1022

Header() problem

Hey, I'm working on a website and on my pc it works fine, but on my host it keeps giving me errors. Error: Warning: Cannot modify header information - headers already sent by /code] Code: [code]if(isset($_COOKIE['username'])): else: header ("location:login.php"); endif; $user = $_COOKIE['username'];
by andor1995
Thu Jan 26, 2012 9:35 am
Forum: PHP Scripts
Topic: Looking for this [check inside]
Replies: 1
Views: 646

Looking for this [check inside]

I'm looking for a "menu" or what is it called, that appears upside of the textbox when your editing a post or page or w/e. And you can add tag with it. Like place the text to center or make text bold etc etc...

I'd need it's script.

something like this:

Image
by andor1995
Thu Jan 26, 2012 9:03 am
Forum: PHP Scripts
Topic: MY PHP TEMPLATE ENGIN
Replies: 1
Views: 675

Re: MY PHP TEMPLATE ENGIN

Does this allowes us to change the websites theme?
by andor1995
Tue Jan 24, 2012 2:56 am
Forum: PHP General
Topic: how to create pages using mysql db [help]
Replies: 0
Views: 219

how to create pages using mysql db [help]

Hey, can someone tell ma how can I create a dynamic web page using php an mysql? And so the page can be added to the menu.
by andor1995
Tue Jan 24, 2012 2:18 am
Forum: PHP coding => General
Topic: Undefined index [help]
Replies: 3
Views: 536

Re: Undefined index [help]

Thank you :)
by andor1995
Mon Jan 23, 2012 10:27 pm
Forum: PHP coding => General
Topic: Undefined index [help]
Replies: 3
Views: 536

Undefined index [help]

Hey I keep getting this error on my index page: Notice: Undefined index: add in C:\xampp\htdocs\admin\index.php on line 46 Notice: Undefined index: update in C:\xampp\htdocs\admin\index.php on line 48 But the add and update is defined in a form. <? if($_POST['add']): $obj->add_content($_POST); elsei...
by andor1995
Mon Jan 23, 2012 9:16 am
Forum: PHP Scripts
Topic: Post update form [not working]
Replies: 9
Views: 1012

Re: Post update form [not working]

I'm sorry for being such an idiot. I tried it that way many times and it didn't worked. it works now. Thanks for your help :) and sorry again
by andor1995
Mon Jan 23, 2012 9:10 am
Forum: PHP Scripts
Topic: Post update form [not working]
Replies: 9
Views: 1012

Re: Post update form [not working]

M8, my problem is not with that... my problem is that this form should pull out information from the MYSQL database... What is so hard to understand?
by andor1995
Mon Jan 23, 2012 9:07 am
Forum: PHP Scripts
Topic: Post update form [not working]
Replies: 9
Views: 1012

Re: Post update form [not working]

No, you miss understood it. the index.php?=id=23 is the posts ID. But that form should get that id in the post_update_form at the $id so it selects that row which contains the title and body for that post.
by andor1995
Mon Jan 23, 2012 8:58 am
Forum: PHP Scripts
Topic: Post update form [not working]
Replies: 9
Views: 1012

Re: Post update form [not working]

The $id is the id of the post. Like index.php?id=23 in this case the $id = '23' but it's different for each post.

this is how it is called on the page:

Code: Select all

  <?=$obj->update_content_form($_get['$id'])?>
And sorry for 2x posting.
by andor1995
Mon Jan 23, 2012 8:51 am
Forum: PHP coding => General
Topic: need help
Replies: 1
Views: 303

need help

function update_content_form($id) { $id = mysql_real_escape_string($id); $res = mysql_query("SELECT * FROM posts WHERE id = '$id'") or die(mysql_error()); $row = mysql_fetch_assoc($res); ?> <form method="post" action="index.php"> <div> <input type="hidden" name="update" value="true" /> <input type=...
by andor1995
Mon Jan 23, 2012 8:32 am
Forum: PHP Scripts
Topic: Post update form [not working]
Replies: 9
Views: 1012

Post update form [not working]

Hey, I started to make a cms by following a tutorial. I did everything the same way as the person in the video, but my function update_content_form($id) doesn't works. I should pull out the title and the body from the mysql database but it doesn't pulls out anything. Here is the function code: funct...