Jump to content

JabsBlog

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

JabsBlog's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [quote author=kenrbnsn link=topic=99455.msg391741#msg391741 date=1152073651] You are also missing some backslashes infront of some $. Why don't you run your code, and then try to run the resulting file. The errors in your resulting file will show you where you have errors in the generating script. If I were writing this code, I would replace the long string with escaped characters all over with the following: [/quote] I implemented this code .. thank you for taking time to write it .. I have 2 issues with it however.. 1. $tmp[] = '$query = "SELECT * FROM child_post WHERE child_id=$blog_id ORDER by id DESC";'; < - On this line where is says child_id=$blog_id .. the blog_id needs to be implemented here .. instead in the file that is created it just says child_id=$blog_id .. instead of child_id=(  the ID that was brought over from the previous form )  2. $tmp[] = '<strong>You are replying to: $name</strong>'; < -- On this line .. it states You are replying to: $name .. on the page that is created it says that same phrase .. Its not getting the $name variable from the previous form. Like it was before but it just was including a \ before ' and before "
  2. [quote author=thorpe link=topic=99455.msg391742#msg391742 date=1152073902] Must be the php highlighting toying with it then. [quote]When I view the file that was created... The section where it states You are replying to $name...  will display a \ before the ' or " [/quote] Which ' or " are you talking about? Can you paste the actual file created? Put it in [ code ] [ / code ] brackets. Also... I have to ask. Why exactly are you doing this? It jsut doesn't make allot of sense to me? [/quote] I am new to php and am working on a project to have the ability to submit a Link .. and once that link is submitted it goes to the admin to be Approved, check for a junk post, .. Once approved the form will submit to the engine above that writes the info to a db, and at the same time  creates a 'child' page that will allow people to post a child post to the partent post. Im sure I have gone about this the long way .. but like I said Im new to PHP and don't know very much. This is just the vision we saw and I have been trying to do whateve I can to write the code. Here is the file that is created after 'approved' by the admin which runs through the engine above. [code] <html> <head> <title>BlogLink :: Democratic Blogging</title> <link rel="stylesheet" type="text/css" href="../../styles/index.css" /> <script language="JavaScript" type="text/javascript"> <!-- function submit ( selectedtype ) {   document.childsubmit.child_id.value = selectedtype ;   document.childsubmit.submit() ; } --> </script> </head> <body> <?php include("../db.php"); mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "SELECT * FROM child_post WHERE child_id=868120921 ORDER by id DESC"; $result = mysql_query($query); $num = mysql_numrows($result); mysql_close(); ?><div id="wrapper"> <div id="ad"> <a href="../index.php"><img src="../../images/header.jpg" alt="BlogLink" border="0"/></a> <br /><img src="../images/addemo.jpg"/></div> <div id="addto"> <ul id="navlist1"> <li>Get the feed:</li> <li id="active1"><a href="http://feeds.my.aol.com/add.jsp?url=http://www.bloglink.com/rss.xml" id="current1">MyAOL</a></li> <li><a href="http://fusion.google.com/add?feedurl=http://www.bloglink.com/rss.xml">Google</a></li> <li><a href="http://add.my.yahoo.com/rss?url=http://www.bloglink.com/rss.xml">Yahoo</a></li> <li><a href="http://www.bloglines.com/sub/http://www.bloglink.com/rss.xml">Bloglines</a></li> <li><a href="http://www.bloglink.com/rss.xml"><img src="images/xml.gif" alt="xml" border="0" /></a></li> </ul> </div> <div id="navcontainer"> <ul id="navlist"> <li id="active"> <li><a href="../index.php">Home</a></li> <li><a href="../submit.php">Submit Story</a></li> <!-- When it's done <li><a href="categories.html">Categories</a></li> --> <li><a href="../faq.html">FAQ</a></li> <li><a href="../about.html">About</a></li> <li><a href="../contact.php">Contact Us</a></li> </ul> </div> <div id="content"> <?php $name = stripslashes($name); $reason = stripslashes($reason); $i=0; while ($i < $num) { $url = mysql_result($result,$i,"url"); $name = mysql_result($result,$i,"name"); $reason = mysql_result($result,$i,"reason"); ?> <div id="parent"><a href="<? echo $url; ?>"><? echo $name; ?></a></div> <div id="snippet"><?php echo $reason; ?></div> <a href="aim:goim?message=<? echo $url; ?>"><img src="images/offline.gif" alt="IM this article" border="0" /></a> <br /><br /> <?php $i++; } ?> <!-- Submit fields --> <hr /> <strong>You are replying to: Test 1 with a\'in between and also \"around\" and with-a-hyphen</strong> <form action="../scripts/childAdd.php" method="post"> <table border="0" cellpadding="5"> <tr> <td align="right"><strong>Your Article URL:</strong></td> <td><input type="text" name="url" size="70" /></td> </tr> <tr> <td align="right"><strong>Your Article Name:</strong></td> <td><input type="text" name="name" size="70" /></td> </tr> <tr> <td align="right"><strong>Your Summary:</strong></td> <td><textarea name="reason" rows="3" cols="70"></textarea></td> </tr> <tr> <td></td> <td align="right"><input type="submit" value="Submit Article" /></td> </tr> </table> <input type="hidden" value="868120921" name="child_id" /> </form> <p class="copyright">Copyright 2006 &copy; BlogLink</p> </div> </div> </body> </html> [/code] As you can see in this line .. <strong>You are replying to: Test 1 with a\'in between and also \"around\" and with-a-hyphen</strong> it is putting in a \ before a ' and before a "
  3. [quote author=thorpe link=topic=99455.msg391734#msg391734 date=1152072840] Then.. can you explain why the last " in this line has a backslash but not the first? [code=php:0] include("../db.php\"); [/code] [/quote] Thats weird .. when I post it here it is there .. but for some reason its not there after I submit .. If I do a preview it disappears. too .. Trust me I have trippled checked it and I am not missing any  \ in the code. I don't know but for reasons unknown the code changes after I submit it here .. so I have the code on my site .. you can viewit here .. [url=http://test.imanass.com/BlogLink/code.txt]http://test.imanass.com/BlogLink/code.txt[/url]
  4. [quote author=thorpe link=topic=99455.msg391671#msg391671 date=1152058278] Now I see [i]what[/i] your doing, though the [i]why[/i] eludes me. You have quite a few spots in the file where you need to escape double quotes. eg; [code] include("../db.php\"); [/code] should be... [code] include(\"../db.php\"); [/code] And [code] $url = mysql_result($result,$i,"url\"); [/code] needs to be... [code] $url = mysql_result($result,$i,\"url\"); [/code] Im sure there is more, but you get the point. [/quote] humm I dont think that is i rechecked my code an im not missing any \ [code] <? include("../db.php"); $url = $_POST['url']; $name = $_POST['name']; $reason = $_POST['reason']; $blog_id = $_POST['blog_id']; $childpage = "$blog_id.php"; $handle = fopen("../../articles/$childpage", 'x+'); $htmlpage = "<html> <head> <title>BlogLink :: Democratic Blogging</title> <link rel=\"stylesheet\" type=\"text/css\" href=\"../../styles/index.css\" /> <script language=\"JavaScript\" type=\"text/javascript\"> <!-- function submit ( selectedtype ) {   document.childsubmit.child_id.value = selectedtype ;   document.childsubmit.submit() ; } --> </script> </head> <body> <?php include(\"../db.php\"); mysql_connect(localhost,\$username,\$password); @mysql_select_db(\$database) or die( \"Unable to select database\"); \$query = \"SELECT * FROM child_post WHERE child_id=$blog_id ORDER by id DESC\"; \$result = mysql_query(\$query); \$num = mysql_numrows(\$result); mysql_close(); ?><div id=\"wrapper\"> <div id=\"ad\"> <a href=\"../index.php\"><img src=\"../../images/header.jpg\" alt=\"BlogLink\" border=\"0\"/></a> <br /><img src=\"../images/addemo.jpg\"/></div> <div id=\"addto\"> <ul id=\"navlist1\"> <li>Get the feed:</li> <li id=\"active1\"><a href=\"http://feeds.my.aol.com/add.jsp?url=http%3A//www.bloglink.com/rss.xml\" id=\"current1\">MyAOL</a></li> <li><a href=\"http://fusion.google.com/add?feedurl=http://www.bloglink.com/rss.xml\">Google</a></li> <li><a href=\"http://add.my.yahoo.com/rss?url=http://www.bloglink.com/rss.xml\">Yahoo</a></li> <li><a href=\"http://www.bloglines.com/sub/http://www.bloglink.com/rss.xml\">Bloglines</a></li> <li><a href=\"http://www.bloglink.com/rss.xml\"><img src=\"images/xml.gif\" alt=\"xml\" border=\"0\" /></a></li> </ul> </div> <div id=\"navcontainer\"> <ul id=\"navlist\"> <li id=\"active\"> <li><a href=\"../index.php\">Home</a></li> <li><a href=\"../submit.php\">Submit Story</a></li> <!-- When it's done <li><a href=\"categories.html\">Categories</a></li> --> <li><a href=\"../faq.html\">FAQ</a></li> <li><a href=\"../about.html\">About</a></li> <li><a href=\"../contact.php\">Contact Us</a></li> </ul> </div> <div id=\"content\"> <?php \$name = stripslashes(\$name); \$reason = stripslashes(\$reason); \$i=0; while (\$i < \$num) { \$url = mysql_result(\$result,\$i,\"url\"); \$name = mysql_result(\$result,\$i,\"name\"); \$reason = mysql_result(\$result,\$i,\"reason\"); ?> <div id=\"parent\"><a href=\"<? echo \$url; ?>\"><? echo \$name; ?></a></div> <div id=\"snippet\"><?php echo \$reason; ?></div> <a href=\"aim:goim?message=<? echo \$url; ?>\"><img src=\"images/offline.gif\" alt=\"IM this article\" border=\"0\" /></a> <br /><br /> <?php \$i++; } ?> <!-- Submit fields --> <hr /> <strong>You are replying to: $name</strong> <form action=\"../scripts/childAdd.php\" method=\"post\"> <table border=\"0\" cellpadding=\"5\"> <tr> <td align=\"right\"><strong>Your Article URL:</strong></td> <td><input type=\"text\" name=\"url\" size=\"70\" /></td> </tr> <tr> <td align=\"right\"><strong>Your Article Name:</strong></td> <td><input type=\"text\" name=\"name\" size=\"70\" /></td> </tr> <tr> <td align=\"right\"><strong>Your Summary:</strong></td> <td><textarea name=\"reason\" rows=\"3\" cols=\"70\"></textarea></td> </tr> <tr> <td></td> <td align=\"right\"><input type=\"submit\" value=\"Submit Article\" /></td> </tr> </table> <input type=\"hidden\" value=\"$blog_id\" name=\"child_id\" /> </form> <p class=\"copyright\">Copyright 2006 &copy; BlogLink</p> </div> </div> </body> </html>"; fwrite ($handle, $htmlpage); fclose; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "INSERT INTO approved VALUES ('','$blog_id','$url','$name','$reason')"; mysql_query($query); mysql_close(); header("Location: ../../index.php"); die; ?> [/code]
  5. [quote author=thorpe link=topic=99455.msg391664#msg391664 date=1152057416] This code should be throwing errors all over the place, you have backslashes everywhere. example... [code=php:0] mysql_connect(localhost,\$username,\$password); [/code] Why are there backslashes before $username and $password? [/quote] Everything after the fopen is not pharsed.. it is all written to a file. I am writing this information to a file .. using the \ before the $ will allow the file to create the $var .. if I didn't put the \ before the $ .. it would just display var. So the output file looks like this .. [code] <html> <head> <title>BlogLink :: Democratic Blogging</title> <link rel="stylesheet" type="text/css" href="../../styles/index.css" /> <script language="JavaScript" type="text/javascript"> <!-- function submit ( selectedtype ) {   document.childsubmit.child_id.value = selectedtype ;   document.childsubmit.submit() ; } --> </script> </head> <body> <?php include("../db.php"); mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "SELECT * FROM child_post WHERE child_id=2118124293 ORDER by id DESC"; $result = mysql_query($query); $num = mysql_numrows($result); mysql_close(); ?><div id="wrapper"> <div id="ad"> <a href="../index.php"><img src="../../images/header.jpg" alt="BlogLink" border="0"/></a> <br /><img src="../images/addemo.jpg"/></div> <div id="addto"> <ul id="navlist1"> <li>Get the feed:</li> <li id="active1"><a href="http://feeds.my.aol.com/add.jsp?url=http%3A//www.bloglink.com/rss.xml" id="current1">MyAOL</a></li> <li><a href="http://fusion.google.com/add?feedurl=http://www.bloglink.com/rss.xml">Google</a></li> <li><a href="http://add.my.yahoo.com/rss?url=http://www.bloglink.com/rss.xml">Yahoo</a></li> <li><a href="http://www.bloglines.com/sub/http://www.bloglink.com/rss.xml">Bloglines</a></li> <li><a href="http://www.bloglink.com/rss.xml"><img src="images/xml.gif" alt="xml" border="0" /></a></li> </ul> </div> <div id="navcontainer"> <ul id="navlist"> <li id="active"> <li><a href="../index.php">Home</a></li> <li><a href="../submit.php">Submit Story</a></li> <!-- When it's done <li><a href="categories.html">Categories</a></li> --> <li><a href="../faq.html">FAQ</a></li> <li><a href="../about.html">About</a></li> <li><a href="../contact.php">Contact Us</a></li> </ul> </div> <div id="content"> <?php $i=0; while ($i < $num) { $url = mysql_result($result,$i,"url"); $name = mysql_result($result,$i,"name"); $reason = mysql_result($result,$i,"reason"); $name = stripslashes($name); $reason = stripslashes($reason); ?> <div id="parent"><a href="<? echo $url; ?>"><? echo $name; ?></a></div> <div id="snippet"><?php echo $reason; ?></div> <a href="aim:goim?message=<? echo $url; ?>"><img src="images/offline.gif" alt="IM this article" border="0" /></a> <br /><br /> <?php $i++; } ?> <!-- Submit fields --> <hr /> <strong>You are replying to: Test 1 with a\'in between and also \"around\" and with-a-hyphen 4</strong> <form action="../scripts/childAdd.php" method="post"> <table border="0" cellpadding="5"> <tr> <td align="right"><strong>Your Article URL:</strong></td> <td><input type="text" name="url" size="70" /></td> </tr> <tr> <td align="right"><strong>Your Article Name:</strong></td> <td><input type="text" name="name" size="70" /></td> </tr> <tr> <td align="right"><strong>Your Summary:</strong></td> <td><textarea name="reason" rows="3" cols="70"></textarea></td> </tr> <tr> <td></td> <td align="right"><input type="submit" value="Submit Article" /></td> </tr> </table> <input type="hidden" value="2118124293" name="child_id" /> </form> <p class="copyright">Copyright 2006 &copy; BlogLink</p> </div> </div> </body> </html> [/code]
  6. On this page I have info that is submitted to a DB and it also ouputs information to a file. When I view the file that was created... The section where it states [b]You are replying to $name... [/b] will display a \ before the ' or " I have tryed to use the stripslashes and that works for the information that is pulled from the Database. However the var that I am calling is not from the Database ... it is from the previous form, and does not seem to be working in the file that was created. I am not sure what to put in my file that is created .. so when I display $name it will not have a \ before the quotes. [code]<? include("../db.php"); $url = $_POST['url']; $name = $_POST['name']; $reason = $_POST['reason']; $blog_id = $_POST['blog_id']; $childpage = "$blog_id.php"; $handle = fopen("../../articles/$childpage", 'x+'); $htmlpage = "<html> <head> <title>BlogLink :: Democratic Blogging</title> <link rel=\"stylesheet\" type=\"text/css\" href=\"../../styles/index.css\" /> <script language=\"JavaScript\" type=\"text/javascript\"> <!-- function submit ( selectedtype ) {   document.childsubmit.child_id.value = selectedtype ;   document.childsubmit.submit() ; } --> </script> </head> <body> <?php include(\"../db.php\"); mysql_connect(localhost,\$username,\$password); @mysql_select_db(\$database) or die( \"Unable to select database\"); \$query = \"SELECT * FROM child_post WHERE child_id=$blog_id ORDER by id DESC\"; \$result = mysql_query(\$query); \$num = mysql_numrows(\$result); mysql_close(); ?><div id=\"wrapper\"> <div id=\"ad\"> <a href=\"../index.php\"><img src=\"../../images/header.jpg\" alt=\"BlogLink\" border=\"0\"/></a> <br /><img src=\"../images/addemo.jpg\"/></div> <div id=\"addto\"> <ul id=\"navlist1\"> <li>Get the feed:</li> <li id=\"active1\"><a href=\"http://feeds.my.aol.com/add.jsp?url=http%3A//www.bloglink.com/rss.xml\" id=\"current1\">MyAOL</a></li> <li><a href=\"http://fusion.google.com/add?feedurl=http://www.bloglink.com/rss.xml\">Google</a></li> <li><a href=\"http://add.my.yahoo.com/rss?url=http://www.bloglink.com/rss.xml\">Yahoo</a></li> <li><a href=\"http://www.bloglines.com/sub/http://www.bloglink.com/rss.xml\">Bloglines</a></li> <li><a href=\"http://www.bloglink.com/rss.xml\"><img src=\"images/xml.gif\" alt=\"xml\" border=\"0\" /></a></li> </ul> </div> <div id=\"navcontainer\"> <ul id=\"navlist\"> <li id=\"active\"> <li><a href=\"../index.php\">Home</a></li> <li><a href=\"../submit.php\">Submit Story</a></li> <!-- When it's done <li><a href=\"categories.html\">Categories</a></li> --> <li><a href=\"../faq.html\">FAQ</a></li> <li><a href=\"../about.html\">About</a></li> <li><a href=\"../contact.php\">Contact Us</a></li> </ul> </div> <div id=\"content\"> <?php \$name = stripslashes(\$name); \$reason = stripslashes(\$reason); \$i=0; while (\$i < \$num) { \$url = mysql_result(\$result,\$i,\"url\"); \$name = mysql_result(\$result,\$i,\"name\"); \$reason = mysql_result(\$result,\$i,\"reason\"); ?> <div id=\"parent\"><a href=\"<? echo \$url; ?>\"><? echo \$name; ?></a></div> <div id=\"snippet\"><?php echo \$reason; ?></div> <a href=\"aim:goim?message=<? echo \$url; ?>\"><img src=\"images/offline.gif\" alt=\"IM this article\" border=\"0\" /></a> <br /><br /> <?php \$i++; } ?> <!-- Submit fields --> <hr /> <strong>You are replying to: $name</strong> <form action=\"../scripts/childAdd.php\" method=\"post\"> <table border=\"0\" cellpadding=\"5\"> <tr> <td align=\"right\"><strong>Your Article URL:</strong></td> <td><input type=\"text\" name=\"url\" size=\"70\" /></td> </tr> <tr> <td align=\"right\"><strong>Your Article Name:</strong></td> <td><input type=\"text\" name=\"name\" size=\"70\" /></td> </tr> <tr> <td align=\"right\"><strong>Your Summary:</strong></td> <td><textarea name=\"reason\" rows=\"3\" cols=\"70\"></textarea></td> </tr> <tr> <td></td> <td align=\"right\"><input type=\"submit\" value=\"Submit Article\" /></td> </tr> </table> <input type=\"hidden\" value=\"$blog_id\" name=\"child_id\" /> </form> <p class=\"copyright\">Copyright 2006 &copy; BlogLink</p> </div> </div> </body> </html>"; fwrite ($handle, $htmlpage); fclose; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "INSERT INTO approved VALUES ('','$blog_id','$url','$name','$reason')"; mysql_query($query); mysql_close(); header("Location: ../../index.php"); die; ?>[/code]
  7. Ok here is my Issue .. I am creating a site where people can submit an entry. After the entry is submitted it is approved by an 'admin' .. once the admin approves the entry it is writen to a database in a table called approved. My index file .. shown below .. calls to the database and displays the enteries in dec order. Each entry is assigned a unique ID. I have created a form that will allow the user to post a child to the Parent post. My problem is getting the Unique ID from my index page .. to my new form on the next page. I have included the unique blog_id in a hidden field in my index page. but once I click submit .. my action page. will not display the blog_id of the item that was submitted. .. It will display the first entry in the database. Is there a way to grab the ID of the post and get that information to the new table on the next page. Index.php [code]<script language="JavaScript" type="text/javascript"> function submit ( selectedtype ) {   document.childsubmit.submit() ; } </script> </head> <body> <?php include("db.php"); mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "SELECT * FROM approved ORDER by id DESC"; $result = mysql_query($query); $num = mysql_numrows($result); mysql_close(); ?> <div id="wrapper"> <div id="ad"> <a href="index.php"><img src="images/header.jpg" alt="BlogLink" border="0"/></a> <br /><img src="images/addemo.jpg"/></div> <div id="addto"> <ul id="navlist1"> <li>Get the feed:</li> <li id="active1"><a href="http://feeds.my.aol.com/add.jsp?url=http%3A//www.bloglink.com/rss.xml" id="current1">MyAOL</a></li> <li><a href="http://fusion.google.com/add?feedurl=http://www.bloglink.com/rss.xml">Google</a></li> <li><a href="http://add.my.yahoo.com/rss?url=http://www.bloglink.com/rss.xml">Yahoo</a></li> <li><a href="http://www.bloglines.com/sub/http://www.bloglink.com/rss.xml">Bloglines</a></li> <li><a href="http://www.bloglink.com/rss.xml"><img src="images/xml.gif" alt="xml" border="0" /></a></li> </ul> </div> <div id="navcontainer"> <ul id="navlist"> <li id="active"><a href="submit.php" id="current">Submit Story</a></li> <!-- When it's done <li><a href="categories.html">Categories</a></li> --> <li><a href="faq.html">FAQ</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.php">Contact Us</a></li> </ul> </div> <div id="content"> <form action="myblog.php" method="post" name="childsubmit"> <?php $i=0; while ($i < $num) { $url = mysql_result($result,$i,"url"); $name = mysql_result($result,$i,"name"); $reason = mysql_result($result,$i,"reason"); $blog_id = mysql_result($result,$i,"blog_id"); $childpage = "$blog_id.php"; ?> <input type="hidden" value="<? echo $blog_id; ?>" name="child_id"> <input type="hidden" value="<? echo $name; ?>" name="title"> <div id="parent"><a href="<? echo $url; ?>"><? echo $name; ?></a></div> <div id="snippet"><?php echo $reason; ?></div> <a href="/articles/<? echo $childpage; ?>">See Who's Linking</a> <a href="javascript:submit('submit')"><img src="images/link.gif" alt="submit your link" border="0" /></a> <a href="aim:goim?message=<? echo $url; ?>"><img src="images/offline.gif" alt="IM this article" border="0" /></a><font size="2"></font> <br /><br /> <?php $i++; } ?> </form>[/code] mylog.php The $child_id will only display the first entry of the database .. it will not grab the ID of the entry that was click on to submit a child. [code]<?php $title = $_POST['title']; $child_id = $_POST['child_id']; ?> <html> <head> <title>BlogLink :: Democratic Blogging</title> <link rel="stylesheet" type="text/css" href="styles/index.css" /> </head> <body> <div id="wrapper"> <div id="ad"> <a href="index.php"><img src="images/header.jpg" alt="BlogLink" border="0"/></a> <br /><img src="images/addemo.jpg"/></div> <div id="addto"> <ul id="navlist1"> <li>Get the feed:</li> <li id="active1"><a href="http://feeds.my.aol.com/add.jsp?url=http%3A//www.bloglink.com/rss.xml" id="current1">MyAOL</a></li> <li><a href="http://fusion.google.com/add?feedurl=http://www.bloglink.com/rss.xml">Google</a></li> <li><a href="http://add.my.yahoo.com/rss?url=http://www.bloglink.com/rss.xml">Yahoo</a></li> <li><a href="http://www.bloglines.com/sub/http://www.bloglink.com/rss.xml">Bloglines</a></li> <li><a href="http://www.bloglink.com/rss.xml"><img src="images/xml.gif" alt="xml" border="0" /></a></li> </ul> </div> <div id="navcontainer"> <ul id="navlist"> <li id="active"><a href="index.php">Home</a></li> <!-- <li><a href="categories.html">Categories</a></li> --> <li><a href="faq.html">FAQ</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.php">Contact Us</a></li> </ul> </div> <div id="content"> <div id="parent"> <h3>Submit your blog on this story</h3> <strong>You are replying to: <? echo $title; ?></strong> <form action="scripts/childAdd.php" method="post" name="childsubmit"> <table border="0" cellpadding="5"> <tr> <td align="right"><strong>Article URL:</strong></td> <td><input type="text" name="url" size="70" /></td> </tr> <tr> <td align="right"><strong>Article Name:</strong></td> <td><input type="text" name="name" size="70" /></td> </tr> <tr> <td align="right"><strong>Summary:</strong></td> <td><textarea name="reason" rows="3" cols="70"></textarea> <text type"hidden" name="child_id" value="<? echo $child_id; ?>"> </td> </tr> <tr> <td></td> <td align="right"><input type="submit" value="Submit Article" /></td> </tr> </table> </form> </div> <p class="copyright">Copyright 2006 &copy; BlogLink</p> </div> </body> </html> [/code] to see what I am talking about .. goto .. http://test.imanass.com/BlogLink  .. view the page source.. you will see that the first post will have a blog ID of .. 1965080227 .. however when I click the link to add a post to that .. the value of the child ID becomes the first post .. 933281352. So my question is how can I get it to get the ID of the item I am clicking on ?
  8. I have a question on forms and getting the information from 1 form to another on seperate pages. I have a project that I am working on .. My index page pulls information from a Database. One of the fields is called blog_id. This is a random unique number. In my Index page the Parent post has a Unique ID assigned to it in the Database. I want to create a link for a Child Post and be able to display the child post under the Parent Post. I am not quite sure how to go about doing this. Any Help would be thankful
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.