Jump to content

aeris130

Members
  • Posts

    22
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

aeris130's Achievements

Member

Member (2/5)

0

Reputation

  1. Perhaps you could link to a form field that stores the current data (passed on from the previous table using POST or sessions), and (upon submission) sends it to an updating script that updates the particular column and field (using the sessions/post data) with the new entry found in form nr.2?
  2. Suppose I have a field in a column (attributes) that looks like this: pageclass_sfx= back_button= item_title=1 link_titles= introtext=1 section=0 section_link=0 category=0 category_link=0 rating= author= createdate= modifydate= pdf= print= email= keyref= How can I use php to retrieve the value from a single line inside the field, given that there's a value stored at the end of the line (after '=')? Are there any tutorials that deal with this specifically?
  3. Would it be possible to specify a single column in a single table, and only edit/update the string "http://www.myurl.com/web" if it's present (without having to update the entire column, thus leaving the remaining content as-is)? Or do I have to redefine the entire content in the column through some sort of script?
  4. I would like to check every column in every table in my entire MySQL-database. Whenever the string of text "http://www.myurl.com/web" is located inside a column (even though there may be other content there as well), I'd like to replace it (i.e update the column) with "http://www.myurl.com", and leave the rest of said columns text/data as it is. Can this be done using a single SQL-syntax?
  5. My users are currently visiting the following pages in said order: ... - content - content *1 form (posts data to the next page) *2 Inserts data into MySQL yada yada *3 relocates to another page and displays the inserted data -content ... What I'd like to do is to prevent them from going back to *1/2 from *3 (or at least show a message telling them that they've already visited those pages once). They should, however, be able to start the entire sequence all over again. What would be the best method to achieve this using php? I figured sessions might be able to do this, but I don't have much experience with that.
  6. Exactly what I was looking for. Thanks a lot! [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]
  7. Basically, what I want to do is to query a table for several matches (mysql) and generate the output into a table. Every match is supposed to get its own <td>. The problem is, that I only want 4 <td>'s on every row. After that, I'd like to insert a </tr> and start a new <tr> before continuing to generate td's. Is this possible?
  8. [code]SELECT * FROM table WHERE id ='4'"[/code] This selects every column with id 4. But what if I want to select all columns with id 4,5 and 6 at the same time?
  9. I think I've gotten the array to work now, even though it selects the last option i check instead of the first (and it still won't select more then one table). Anyway, I'm not that versed in looping queries or using join's. Are there any (newbie-friendly) documentation written about this?
  10. [code]<input type="checkbox" name="table[]" value="tcg_dex_ex_legend_maker">Ex Legend Maker[/code] Like that? For some reason, it won't display any results at all. Are there any other changes in the code that I need to do? for example, $table=$_GET['table']; still recieves its value from "table", not "table[]", right? (or rather, "table%5B%5D" as it is generated in the url).
  11. I'm trying to configure a search-function on my site, so that users can select one or several tables to search from, using checkboxes. [code]$table=$_GET['table']; $query = "SELECT * FROM $table WHERE $kolumn LIKE \"%$trimmed%\" AND approved='yes'   ORDER BY name ASC";[/code] The value table is currently set by [code]<select name="table">   <option value ="tcg_dex_ex_legend_maker">Ex Legend Maker</option>   <option value ="tcg_dex_ex_delta_species">Ex Delta Species</option>   <option value ="tcg_dex_ex_unseen_forces">Ex Unseen Forces</option>   </select>[/code] But rather then just selecting one table, I'd like to use checkboxes instead. [code] <input type="checkbox" name="table" value="tcg_dex_ex_legend_maker">Ex Legend Maker<br> <input type="checkbox" name="table" value="tcg_dex_ex_delta_species">Ex Delta Species<br> <input type="checkbox" name="table" value="tcg_dex_ex_unseen_forces">Ex Unseen Forces<br>[/code] Needless to say, using checkboxes like this, will only result in one of the options being used. How should I configure my query to recieve several values into $table?
  12. I have the following script written in my head-section: [code]<script> function showhide(id){ if (document.getElementById){ obj = document.getElementById(id); if (obj.style.display == "none"){ obj.style.display = ""; } else { obj.style.display = "none"; } } } </script> [/code] Then I use the following link to show/hide divs (and their content): [code]<a href="#" onclick="showhide('div_venice'); return(false);">Venice</a>[/code] The problem is, I want to put these links on a select-list, and assign different values (for a php query) when I select them. [code]<select name="a_serie">   <option value ="none">       </a></option>   <option value ="ven">Venice</a></option>   <option value ="yor">York</a></option>   </select>[/code] When i select one of the two cities, I also want the javascript-link to show/hide its div. Are there any solutions for this?
  13. So I have the following query: [code]$query = "INSERT INTO tbl1 VALUES ('','$name','$info','$phone','$various')";[/code] The variables are being given their values by typing them in via text-fields, and later submited by calling insert.php. First of all, I'm curious as to how I enable myself to type 's and still be able to submit the query. I've read about add-slashes, but I couldn't grasp it completely (that is, I know that adding \\ before ' bypasses this problem, it's the function addslashes that I haven't grasped). Could someone give an example of the above mentioned query, complete with add-slashes (unless there's a better solution, that is)? Another problem is that any linebreaks typed into the fields, result in all data below the first linebreak being lost. Is there a way to convert linebreaks to html (I suppose <br> would suffice) upon submission?
×
×
  • 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.