vsinha Posted June 23, 2011 Share Posted June 23, 2011 I have a form with a field(url) that is retrieved from database and other things are entered into some fields in the form ,now I am submitting this form and sending it to another script which updates my table of urls with the value of other fields submitted in that page.Now Next time i want to display the same page with next url so i can update the table for that url value,I am retrieving the url with id's ,i cannot figure out how to send this information so it displays the same view with next url.Please help. Link to comment https://forums.phpfreaks.com/topic/240239-form-query/ Share on other sites More sharing options...
Maq Posted June 23, 2011 Share Posted June 23, 2011 Post the relevant code. Link to comment https://forums.phpfreaks.com/topic/240239-form-query/#findComment-1234026 Share on other sites More sharing options...
vsinha Posted June 23, 2011 Author Share Posted June 23, 2011 url.php $id=1; $query5="SELECT url_string from `$pl.$sid.$nextweek` where id=$id"; $result5=mysql_query($query5); //echo $result5; $num_rows2=mysql_num_rows($result5); for($i=0;$i<$num_rows2;$i++){ $urlid=mysql_result($result5,$i,0); ?> <div id="load" align="center"></div> <form action="comment.php" method="post" id="form1" > Current URl:<ul><li> <a href="<?php echo $urlid; ?>" target="somframe"> <?php echo $urlid; ?></a></li></ul> </br> Enter your comment: <input type="text" name="comment" value=""/></br> <input type="hidden" id="url" name="v" value="<?php echo $urlid; ?>"/> <input type="hidden" id="hidden1" name="c" value=""/> <input type="hidden" name="idcall" value="<?php echo $id?>"/> <input type="hidden" id="platform" name="pid" value="<?php echo $pl;?>"/> <input type="hidden" id="software" name="sid" value="<?php echo $sid; ?>"/> <input type="hidden" id="timestamp" name="time" value="<?php echo $nextweek;?>"/> <button type="submit">submit</button> </form> comment.php $db = mysql_connect($settings['MYSQL_host'],$settings['MYSQL_name'], $settings['MYSQL_password']); //Should be moved to config file if (!$db) { die('Could not connect: ' . mysql_error()); } mysql_select_db("drop_down"); $query="UPDATE `$plat_id.$soft.$ti` SET comment='$com',loadtime='$time' WHERE url_string='$url'"; $result=mysql_query($query); Now I want after teh value is updated in tabel is updated in comment.php ,url.php should be displayed and with next url with id =2 so i can update the vale of that url Link to comment https://forums.phpfreaks.com/topic/240239-form-query/#findComment-1234033 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.