Jump to content

Recommended Posts

I need to set a php variable to the same value as this line of php so I can pass it to the next page. How do I go about it?

 

<input type = "text" value = "" disabled name = "proj_id_edit" id = "proj_id_edit" onChange="setProject"></td>

 

$p_id = proj_id_edit.value

Link to comment
https://forums.phpfreaks.com/topic/117125-solved-get-php-variable-fom-html/
Share on other sites

using GET or POST

 

GET:

you can pass it in the url or through a form

url: <a href="page.php?argument=value"> ..

form: <form action="page.php" method="get"><input type="hidden" name="argument" value="value" />

 

POST:

only through a form

<form method="post"><input type="hidden" name="argument" value="value" />

 

type="hidden" does not necessarily be hidden, it also can be text, password, ..

 

download a html reference XHTML 1.0 by preference

i have tried it using url but whats wrong with my code

 

<table width=100% border=0>
<tr>
<td><label for="proj_id_edit">Project ID</label>
<input type = "text" value = "" disabled name = "proj_id_edit" id = "proj_id_edit" onChange="setProject"></td>
<td><label for="projName_edit">Project Name</label>
<input type = "text" value = "" disabled name = "projName_edit" id = "projName_edit"></td></tr>
<tr><td><label for="comp_edit">Company Name</label>
<input type = "text" value = "" disabled name = "comp_edit" id = "comp_edit"></td>
<td><label for="access_edit">Access</label>
<input type = "text" value = "" name = "access_edit" id = "access_edit"></td></tr>
<tr><td><label for="cable_edit">Cable Entry</label>
<input type = "text" value = "" name = "cable_edit" id = "cable_edit"></td>
<td><label for="ip_edit">IP Rating</label>
<input type = "text" value = "" name = "ip_edit" id = "ip_edit"></td></tr>
<tr><td><label for="fault_edit">Fault Rating</label>
<input type = "text" value = "" name = "fault_edit" id = "fault_edit"><span>KW/sec</span></td>
<td><label for="iform_edit">Form</label>
<input type = "text" value = "" name = "iform_edit" id = "iform_edit"></td></tr>
<tr><td><label for="pman_edit">Project Manager</label>
<input type = "text" value = "" name = "pman_edit" id = "pman_edit"></td>
<td><label for="deadline_edit">Tender Deadline</label>
<input type = "text" value = "" name = "deadline_edit" id = "deadline_edit"></td>
</tr>
<tr><td><input type="button" value="Update" name="update" onClick="updateProjectDetails()">
<div id="xx"></div></td></tr></table>
</fieldset>
<fieldset>
<legend>4. Proceed to Design Mode</legend>
<input type="button" value="Design Mode" onClick = "window.open('designmode.php?p_id = {document.getElementById("proj_id_edit").value}', '', 'width=1280, height=700, resizable=yes, statusbar=yes')">
</fieldset>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.