Everything posted by abeer
-
pagination
charecters: x number of charecter image: yes html table: yes what will be best split/explode in charecterwise? or paragrapwise?
-
pagination
by googling All the tutorials I've found on pagination always refer to paginating multiple rows out of a database. Like displaying 5 rows on each page. But I'm trying to paginate an article that is being stored in one row of the table. my table name is "page" in the table "page" there is 4 rows ------------------------------------------------------------- id | title | meta_description| meta_keywords |article -------------------------------------------------------------- 1 | title1 | meta 1| meta kewords |articles text1 bla blabla 2 | title2 | meta 2| meta kewords |articles text2 bla blabla 3 | title3 | meta 3| meta kewords |articles text3 bla blabla 4 | title4 | meta 4| meta kewords |articles text4 bla blabla so in id=1 in the article text there is a article which almost 10 page size. so i need pagination for this article But how?
-
pagination
i am not understanding the private variables.
-
pagination
here is the link test link here i pulled data from mysql databse from id 3. by using url variable here is the codes <?php mysql_connect('localhost', 'ash', 'lash') or die('Connection Failed'); mysql_select_db('lash') or die('Database not found'); $id = (int) $_GET['id']; $result = mysql_query("SELECT title, dtl, meta_description, meta_keywords FROM page WHERE id=$id"); if (!mysql_num_rows($result)) { header('Location: 404.php', true, 404); die();}$row = mysql_fetch_array($result);$title = stripslashes($row['title']); $dtl = stripslashes($row['dtl']);$meta_desc = stripslashes($row['meta_description']);$meta_keys = stripslashes($row['meta_keywords']);?><html><head><meta name="description" content="<?php echo $meta_description; ?>" /><meta name="keywords" content="<?php echo $meta_keywords; ?>" /><title>MySite.com - <?php echo $title; ?></title></head><body><h1><?php echo $title; ?></h1><?php echo $dtl; ?></body></html> but if my description for the id 3 is very large i need pagination. the description comes from the id 3"s $dtl field .. but i dont know how to do this or how to start.. any helo any suggestion any tutorial ? advance thanks for all mates
-
Is this possible?
oh really thanks for the help.. i am trying todo so on my local server.if i fail again then i will konock you again ... And you are not bad in expaining things.. actually i have no much knowledge to understand..
-
Is this possible?
thank you very much... i dont understand this line clearly... Basically, you should never use a static number "WHERE `id`='1'" instead you should use variables as they can change, "WHERE `id`='$id'" hope this helps! can you please clarify this more. it will be very helpful for me
-
Is this possible?
gr8 link you provided . +1 for this
-
Is this possible?
i google for this but iam not finding any example or tutorial for this it will be helpfull for me i f i get a real world example
-
Is this possible?
Hi there... i use below code to display data from mysql row from specific id. here is id=1 <?php mysql_connect("localhost", "dhaka", "dhaka") or die("Connection Failed"); mysql_select_db("dhaka")or die("Connection Failed"); $result = mysql_query("SELECT *FROM page WHERE id='1'") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "content: ".$row['dtl']; ?> now i included this code by using php include function in one page called " johns page.php" so when i click the "john page" the page come with the pulling from id=1. but if i have 30 page like " kate page" ," roberts page", "michale page"...... then i have to include the above code 30 time by editing it manusally have to change the id number. for "kate page" i have to change manually the line $result = mysql_query("SELECT *FROM page WHERE id='1'") to $result = mysql_query("SELECT *FROM page WHERE id='2'") and include the code to " kate page.php" which is horrible expreince for multiple page... is it possible that the id number will automatically change when i click on different page? please help me
-
How can i do this?
it can be done without echo... but i am facing another problem... i attached ck editor with this text area. after editing the contentand clicking the button "change" the content changed and the page get refresh and then the text area come without ck editor. why the ck editor dont load that time after clicking the change button?
-
How can i do this?
Hi there. i doscover the problem the problem was in this two line if(isset($_POST['id'])) { mysql_query("UPDATE 'page' SET dtl='".$_POST['content']."' WHERE id = ".$_POST['id']); } and i change it to if(isset($_POST['id'])) { echo $sql="UPDATE page SET dtl='".$_POST['content']."' WHERE id = ".$_POST['id']; mysql_query($sql) or die(mysql_error()); } and now it works fantasticly
-
How can i do this?
Fatal error: Call to a member function fetch_object() on a non-object in c:\wamp\www\antcms\editnow.php on line 11
-
How can i do this?
it says: resource(2) of type (mysql result) and there is a text area with change button
-
How can i do this?
Done!! no error or warning come... thanks mates very thanks But the problem is .. 1. no change appers on the id 3 2.the text are dont load the existing data
-
How can i do this?
Yes mate. i am trying. but i failed. and i learn all the thing from this forum and all you whos are very kind always help me to learn...
-
How can i do this?
yep i changed the line before you told me.. but the problem again the line is $result = mysql_query("SELECT * from 'page' WHERE id = '3'"); $data = mysql_fetch_assoc($result); and shows warning: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in c:\wamp\www\antcms\editnow.php on line 10
-
How can i do this?
<?php mysql_connect("localhost", "dhaka", "dhaka") or die("Connection Failed"); mysql_select_db("dhaka")or die("Connection Failed"); if(isset($_POST['id'])) { mysql_query("UPDATE 'page' SET dtl='".$_POST['content']."' WHERE id = ".$_POST['id']); } $result = mysql_query("SELECT * from 'page' WHERE id = '3'"); $data = mysql_fetch_assoc(); $id = $data['id']; $content = $data['dtl']; ?> <html> <head></head> <body> <form name="change_content" method="POST" action="editnow.php"> <input type="hidden" name="id" value="<?php $id ?>"> <input type="text" name="content" value="<?php $content ?>"> <input type="submit" value="change"> </form> </body> </html> ANOTHER ERROR: Warning: Wrong parameter count for mysql_fetch_assoc() in c:\wamp\www\antcms\editnow.php on line 10
-
How can i do this?
another error msg: Fatal error: Call to a member function query() on a non-object in c:\wamp\www\antcms\editnow.php on line 8 <?php mysql_connect("localhost", "dhaka", "dhaka") or die("Connection Failed"); mysql_select_db("dhaka")or die("Connection Failed"); if(isset($_POST['id'])) { $mysql->query("UPDATE 'page' SET content='".$_POST['content']."' WHERE id = ".$_POST['id']); } $result = $mysql->query("SELECT * from 'page' WHERE id = '3'"); $data = $mysql->fetch_assoc(); $id = $data['id']; $content = $data['content']; ?> <html> <head></head> <body> <form name="change_content" method="POST" action="editnow.php"> <input type="hidden" name="id" value="<?php $id ?>"> <input type="text" name="content" value="<?php $content ?>"> <input type="submit" value="change"> </form> </body> </html> I have two field one is "id" another is "dtl"
-
How can i do this?
again:( Parse error: parse error, unexpected '{' in c:\wamp\www\antcms\editnow.php on line 4 <?php $mysql = new mysqli($localhost, $dhaka, $dhaka, $dhaka); if(isset($_POST['id']) { $mysql->query("UPDATE 'page' SET content='".$_POST['content']."' WHERE id = ".$_POST['id']); } $result = $mysql->query("SELECT * from 'page' WHERE id = '2'"); $data = $mysql->fetch_assoc(); $id = $data['id']; $content = $data['content']; ?> <html> <head></head> <body> <form name="change_content" method="POST" action="editnow.php"> <input type="hidden" name="id" value="<?php $id ?>"> <input type="text" name="content" value="<?php $content ?>"> <input type="submit" value="change"> </form> </body> </html>
-
How can i do this?
an error occured Parse error: parse error, unexpected '{' in c:\wamp\www\abeer\editnow.php on line 5 my database name: dhaka tablename:page there is two field one is "id" another is "dtl" and here is the code <?php $mysql = new mysqli($localhost, $dhaka, $dhaka, $dhaka); if(isset($_POST['id']) { $mysql->query("UPDATE 'table_name' SET content='".$_POST['content']."' WHERE id = ".$_POST['id']); } $result = $mysql->query("SELECT * from 'page' WHERE id = '2'"); $data = $mysql->fetch_assoc(); $id = $data['id']; $content = $data['content']; ?> <html> <head></head> <body> <form name="change_content" method="POST" action="editnow.php"> <input type="hidden" name="id" value="<?php $id ?>"> <input type="text" name="content" value="<?php $content ?>"> <input type="submit" value="change"> </form> </body> </html>
-
How can i do this?
Hi there, i make a table in mysql bt phpadmin the table has 2 field ine is "id" and another is "content" and then i create 3 id... and insert data to these id manually without using form. Now i want to edit data from aspecific id and save it. suppose i want load datas from a specif id ( eg :number 3 id) to a text areaand edit/update the data... How can i do this? can any one please help me ? advance thanks
-
data not displaying from database
yep.its working now mate.thanks for your help
-
data not displaying from database
Thanks dude its working <?php mysql_connect("localhost", "dhaka", "dhaka") or die("Connection Failed"); mysql_select_db("dhaka")or die("Connection Failed"); $result = mysql_query("SELECT *FROM page WHERE id='3'") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "content: ".$row['dtl']; ?>
-
data not displaying from database
This code sucessfully working <?php mysql_connect("localhost", "dhaka", "dhaka") or die("Connection Failed"); mysql_select_db("dhaka")or die("Connection Failed"); $result = mysql_query("SELECT *FROM page") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "content: ".$row['dtl']; ?> i have another question: i want to show specific id content here i inserted 3 id for in number 3 id there issome data. i want to retrive data from the number 3 id. how?
-
data not displaying from database
BAD LUCK Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in c:\wamp\www\antcms\show.php on line 6 AND I TRIED ALSO THIS ONE <?php mysql_connect("localhost", "dhaka", "dhaka") or die("Connection Failed"); mysql_select_db("dhaka")or die("Connection Failed"); $query = "SELECT * FROM dhaka"; $result = mysql_query($query); while($row = mysql_fetch_array($result)){ echo $row['dtl'] . "<br />"; } ?> same waring msg